Skip to content

Commit 798da3b

Browse files
committed
Add cargo fmt and clippy checks to CI
Adds a separate lint job that runs cargo fmt --check and cargo clippy --all-targets with -D warnings. Lint output is deterministic across OSes, so it runs only on Ubuntu in parallel with the cross-OS test matrix.
1 parent 1c403a9 commit 798da3b

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,15 @@ jobs:
1212
steps:
1313
- uses: actions/checkout@v4
1414
- uses: dtolnay/rust-toolchain@stable
15-
- run: cargo test
15+
- run: cargo test
16+
17+
lint:
18+
runs-on: ubuntu-latest
19+
timeout-minutes: 5
20+
steps:
21+
- uses: actions/checkout@v4
22+
- uses: dtolnay/rust-toolchain@stable
23+
with:
24+
components: rustfmt, clippy
25+
- run: cargo fmt --check
26+
- run: cargo clippy --all-targets -- -D warnings

0 commit comments

Comments
 (0)