Skip to content

Commit da60179

Browse files
committed
chore(workflow): run clippy on ci
1 parent bb3f0cf commit da60179

1 file changed

Lines changed: 9 additions & 8 deletions

File tree

.github/workflows/CI.yaml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
name: CI
2-
32
on:
43
push:
54
branches: [main]
65
pull_request:
76
branches: [main]
8-
97
env:
108
CARGO_TERM_COLOR: always
11-
9+
# Make sure CI fails on all warnings, including Clippy lints
10+
RUSTFLAGS: "-Dwarnings"
1211
jobs:
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

0 commit comments

Comments
 (0)