Skip to content

Commit

Permalink
streamline lints & checks into one job
Browse files Browse the repository at this point in the history
  • Loading branch information
knzai committed Jul 16, 2024
1 parent 3398240 commit 8b825fe
Showing 1 changed file with 14 additions and 26 deletions.
40 changes: 14 additions & 26 deletions .github/workflows/commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ name: Check

jobs:
check:
name: Check
name: Check and lint
runs-on: ubuntu-latest
steps:
- name: Checkout sources
Expand All @@ -17,12 +17,25 @@ jobs:
profile: minimal
toolchain: stable
override: true
omponents: rustfmt, clippy

- name: Run cargo check
uses: actions-rs/cargo@v1
with:
command: check

- name: Run cargo fmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check

- name: Run cargo clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings

test:
name: Test Suite
runs-on: ubuntu-latest
Expand All @@ -45,29 +58,4 @@ jobs:
with:
command: test

lints:
name: Lints
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2

- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: rustfmt, clippy

- name: Run cargo fmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check

- name: Run cargo clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings

0 comments on commit 8b825fe

Please sign in to comment.