Skip to content

Commit

Permalink
ci: only cargo-clippy a group's latest commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Flouse committed Aug 23, 2023
1 parent bce025f commit 81b510b
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .github/workflows/clippy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ on:
pull_request:
merge_group:

# Ensure that only a single job or workflow using the same concurrency group will run at a time.
# see https://docs.github.com/en/actions/using-jobs/using-concurrency#example-only-cancel-in-progress-jobs-or-runs-for-the-current-workflow
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
# only needs to check a group's latest commit
cancel-in-progress: true

jobs:
cargo-clippy:
strategy:
Expand All @@ -29,8 +36,9 @@ jobs:
target/
key: ${{ matrix.os }}-${{ runner.os }}-${{ runner.arch }}-cargo-clippy-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ matrix.os }}-${{ runner.os }}-${{ runner.arch }}-cargo-clippy
${{ matrix.os }}-${{ runner.os }}-${{ runner.arch }}-cargo
- name: Install cargo-clippy
run: rustup component add clippy

Expand Down

0 comments on commit 81b510b

Please sign in to comment.