File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11name : CI
2-
32on :
43 push :
54 branches : [main]
65 pull_request :
76 branches : [main]
8-
97env :
108 CARGO_TERM_COLOR : always
11-
9+ # Make sure CI fails on all warnings, including Clippy lints
10+ RUSTFLAGS : " -Dwarnings"
1211jobs :
1312 # Run cargo test
1413 test :
@@ -29,21 +28,23 @@ jobs:
2928 key : ${{ runner.os }}-cargo-test-${{ hashFiles('**/Cargo.toml') }}
3029 - name : Install toolchain
3130 uses : dtolnay/rust-toolchain@nightly
31+ with :
32+ components : clippy
3233 - name : Install Dependencies
3334 run : sudo apt-get update
3435 - name : Run cargo test
3536 run : cargo test
36-
37- # Run cargo fmt --all -- --check
38- format :
39- name : Format
37+ clippy-and-format :
38+ name : Clippy & Format
4039 runs-on : ubuntu-latest
4140 steps :
4241 - name : Checkout sources
4342 uses : actions/checkout@v3
4443 - name : Install toolchain
4544 uses : dtolnay/rust-toolchain@nightly
4645 with :
47- components : rustfmt
46+ components : clippy, rustfmt
47+ - name : Run cargo clippy
48+ run : cargo clippy
4849 - name : Run cargo fmt
4950 run : cargo fmt --all -- --check
You can’t perform that action at this time.
0 commit comments