Cancel old CI runs on commit (#12298)

# 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.
This commit is contained in:
Ian Manske 2024-03-26 21:16:48 +00:00 committed by GitHub
parent 8499f7b4f8
commit f8c1e3ac61
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -12,6 +12,10 @@ env:
# If changing these settings also change toolkit.nu # If changing these settings also change toolkit.nu
CLIPPY_OPTIONS: "-D warnings -D clippy::unwrap_used" 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: jobs:
fmt-clippy: fmt-clippy:
strategy: strategy:
@ -167,7 +171,7 @@ jobs:
rustflags: "" rustflags: ""
- name: Clippy - name: Clippy
run: cargo clippy --package nu_plugin_* ${{ matrix.flags }} -- $CLIPPY_OPTIONS run: cargo clippy --package nu_plugin_* -- $CLIPPY_OPTIONS
- name: Tests - name: Tests
run: cargo test --profile ci --package nu_plugin_* run: cargo test --profile ci --package nu_plugin_*