Skip to content

Commit

Permalink
Remove caching in clippy linter job to prevent confusing clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
echeran committed Jul 1, 2020
1 parent 6d2665a commit 52315a0
Showing 1 changed file with 2 additions and 24 deletions.
26 changes: 2 additions & 24 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,33 +113,11 @@ jobs:
steps:
- uses: actions/checkout@v2

# Linting job strict > Cache steps

- name: Cache cargo registry
uses: actions/cache@v1
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.toml') }}

- name: Cache cargo index
uses: actions/cache@v1
with:
path: ~/.cargo/git
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.toml') }}

- name: Cache cargo build
uses: actions/cache@v1
with:
path: target
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.toml') }}

# Linting job strict > Install and run clippy steps

- name: Install clippy
run: rustup component add clippy

# Run clippy second time to fail job on warnings
# `cargo clean` should not be necessary, but empirically, it is needed during Github Actions
# (but not locally in CLI?). poss ex: https://github.com/rust-lang/rust-clippy/issues/4612
# avoid caching to prevent confusing cargo clippy
- name: Fail clippy on warnings
run: cargo clean && cargo clippy --all-targets --all-features -- -D warnings
run: cargo clippy --all-targets --all-features -- -D warnings

0 comments on commit 52315a0

Please sign in to comment.