Skip to content

Commit

Permalink
Use latest version of clippy action to get strict mode
Browse files Browse the repository at this point in the history
  • Loading branch information
echeran committed Jul 8, 2020
1 parent 52315a0 commit 36bfabe
Showing 1 changed file with 5 additions and 25 deletions.
30 changes: 5 additions & 25 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
# make this command fail if cargo fmt had to make changes
run: cargo fmt && git diff-index --exit-code HEAD

# Linting job permissive (cargo-clippy) - completes and puts warnings inline in PR
# Linting job (cargo-clippy) - completes and puts warnings inline in PR

lint:
runs-on: ubuntu-latest
Expand All @@ -72,7 +72,7 @@ jobs:
steps:
- uses: actions/checkout@v2

# Linting job permissive > Cache steps
# Linting job > Cache steps

- name: Cache cargo registry
uses: actions/cache@v1
Expand All @@ -92,32 +92,12 @@ jobs:
path: target
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.toml') }}

# Linting job permissive > Install and run clippy steps
# Linting job > Install and run clippy steps

- name: Install clippy
run: rustup component add clippy

# Run clippy first time to get warnings inserted inline in PR
- uses: actions-rs/clippy-check@v1
- uses: actions-rs/clippy-check@v1.0.7
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-targets --all-features

# Linting job strict (cargo-clippy)

lint_strict:
runs-on: ubuntu-latest

needs: [build]

steps:
- uses: actions/checkout@v2

# Linting job strict > Install and run clippy steps

- name: Install clippy
run: rustup component add clippy

# avoid caching to prevent confusing cargo clippy
- name: Fail clippy on warnings
run: cargo clippy --all-targets --all-features -- -D warnings
args: --all-targets --all-features -- -D warnings

0 comments on commit 36bfabe

Please sign in to comment.