Skip to content

Commit

Permalink
Cancel old CI runs on commit (#12298)
Browse files Browse the repository at this point in the history
# Description
Adds a `concurrency` section to the CI workflow to cancel old CI jobs
when a new commit is pushed to the same branch/PR.
  • Loading branch information
IanManske committed Mar 26, 2024
1 parent 8499f7b commit f8c1e3a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ env:
# If changing these settings also change toolkit.nu
CLIPPY_OPTIONS: "-D warnings -D clippy::unwrap_used"

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }}
cancel-in-progress: true

jobs:
fmt-clippy:
strategy:
Expand Down Expand Up @@ -167,7 +171,7 @@ jobs:
rustflags: ""

- name: Clippy
run: cargo clippy --package nu_plugin_* ${{ matrix.flags }} -- $CLIPPY_OPTIONS
run: cargo clippy --package nu_plugin_* -- $CLIPPY_OPTIONS

- name: Tests
run: cargo test --profile ci --package nu_plugin_*
Expand Down

0 comments on commit f8c1e3a

Please sign in to comment.