Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a clippy job #19

Merged
merged 5 commits into from
Jul 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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