From 928877dee80a03784bf71b797e8b57329f756966 Mon Sep 17 00:00:00 2001 From: dolfies Date: Sat, 30 Nov 2024 22:26:22 -0500 Subject: [PATCH] feat(ci): Cancel in-progress runs when a new run is requested --- .github/workflows/build.yml | 5 +++++ .github/workflows/lint.yml | 5 +++++ .github/workflows/rename.yml | 5 +++++ .github/workflows/test.yml | 5 +++++ 4 files changed, 20 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5d67a930c..e849682b3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -5,6 +5,11 @@ on: pull_request: types: [ opened, synchronize ] +# Runs do not need to be concurrent +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: dists-and-docs: runs-on: ubuntu-latest diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index b7bd8abb1..4beb442b4 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -5,6 +5,11 @@ on: pull_request: types: [ opened, synchronize ] +# Runs do not need to be concurrent +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: check: runs-on: ubuntu-latest diff --git a/.github/workflows/rename.yml b/.github/workflows/rename.yml index 684b8ad5f..54b7f3df0 100644 --- a/.github/workflows/rename.yml +++ b/.github/workflows/rename.yml @@ -5,6 +5,11 @@ on: push: branches: [ master ] +# Runs do not need to be concurrent +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: rename: runs-on: ubuntu-latest diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ca03501ba..cb75bb059 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -5,6 +5,11 @@ on: pull_request: types: [ opened, synchronize ] +# Runs do not need to be concurrent +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: pytest: runs-on: ubuntu-latest