Skip to content

Commit

Permalink
Add a clippy job to workflows (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
JustusAdam authored Jul 26, 2023
1 parent ed2d2d2 commit 10cf23c
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
25 changes: 25 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ jobs:
cargo test --test control_flow_tests
cargo test --test new_alias_analysis_tests
cargo test --test async_tests
intergration-tests:
name: Integration Tests
runs-on: ubuntu-latest
Expand Down Expand Up @@ -76,6 +77,7 @@ jobs:
raco pkg install --auto || raco setup forge
- name: Run Tests
run: cargo test --test external_annotation_tests

format-check:
name: Format Control
runs-on: ubuntu-latest
Expand All @@ -90,3 +92,26 @@ jobs:
key: ${{ runner.os }}-rust-toolchain-${{ hashFiles('rust-toolchain.toml') }}
- name: Perform Check
run: cargo fmt --check

linting:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Cache Toolchain
uses: actions/cache@v3
with:
path: ~/.rustup
key: ${{ runner.os }}-rust-toolchain-${{ hashFiles('rust-toolchain.toml') }}
- name: Cache Dependencies
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-rust-deps-${{ hashFiles('Cargo.lock', 'rust-toolchain.toml') }}
- name: Here come the complaints
run: cargo clippy --all -- -D warnings
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[toolchain]
channel = "nightly-2023-04-12"
components = ["rustc-dev", "rust-src", "rustfmt"]
components = ["rustc-dev", "rust-src", "rustfmt", "clippy"]

# You are probably looking at this because you got an error that the toolchain
# that was configured does not exist,
Expand Down

0 comments on commit 10cf23c

Please sign in to comment.