Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
nahsi committed Aug 4, 2023
1 parent c3fc347 commit faac0c5
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 30 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/action-lints.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: action lints

on:
pull_request:
paths:
- ".github/workflows/**"

concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true

jobs:
reviewdog:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Lint actions
uses: reviewdog/action-actionlint@v1
env:
SHELLCHECK_OPTS: "-e SC2086 -e SC2207 -e SC2128"
with:
reporter: github-pr-check
fail_on_error: true
38 changes: 8 additions & 30 deletions .github/workflows/lint.yml → .github/workflows/cargo-lints.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,17 @@
name: lint
name: cargo lints

on:
pull_request:
types:
- opened
- edited
- synchronize
paths-ignore:
- "**.md"
- ".github/**"
- "!.github/workflows/cargo-lints.yml"

concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true

jobs:
pr:
name: Validate PR title
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

reviewdog:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Lint actions
uses: reviewdog/action-actionlint@v1
env:
SHELLCHECK_OPTS: "-e SC2086 -e SC2207 -e SC2128"
with:
reporter: github-pr-check
fail_on_error: true

cargo:
runs-on: builder

Expand Down Expand Up @@ -63,11 +41,11 @@ jobs:
with:
make-default: false

- name: Run cargo build
run: cargo build
- name: Run cargo check
run: cargo check

- name: Run cargo fmt
run: cargo fmt --all -- --check
uses: actions-rust-lang/rustfmt@v1

- name: Run cargo clippy
uses: giraffate/clippy-action@v1
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/pr-lints.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: PR lints

on:
pull_request:
types:
- opened
- edited
- synchronize

concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true

jobs:
pr:
name: Validate PR title
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit faac0c5

Please sign in to comment.