From f8c1e3ac61851b8806c1639ae3c93f91b1aa4d6f Mon Sep 17 00:00:00 2001 From: Ian Manske Date: Tue, 26 Mar 2024 21:16:48 +0000 Subject: [PATCH] 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. --- .github/workflows/ci.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9ad3508e4d..98a93d3ad3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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: @@ -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_*