From 44ff0b945cfd37dbba5ecd857710d925182c980a Mon Sep 17 00:00:00 2001 From: Stefan Kuhn Date: Sun, 6 Sep 2026 14:51:32 +0200 Subject: [PATCH] ci: add concurrency group to tests Cancel still-running test workflows when a newer run starts for the same PR, branch, or tag. GitHub limits free public repositories to 20 concurrent jobs across all workflow runs. Cancelling obsolete test runs helps avoid wasting those slots on outdated commits. --- .github/workflows/test.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6c95ce2..9cd5c24 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -4,6 +4,12 @@ on: pull_request: workflow_dispatch: +# Group runs by workflow and PR/ref. +# When a new run starts for the same PR, branch, or tag, cancel the older one. +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: test: uses: bats-core/.github/.github/workflows/test.yml@v1