From be489c9e1e2a5743df4d0565f1bfd4728c2fc6b7 Mon Sep 17 00:00:00 2001 From: David Badura Date: Sat, 17 Oct 2026 19:37:18 +0200 Subject: [PATCH] Cancel outdated CI runs Adds a concurrency group to the CI workflows, so a new push to a pull request or branch cancels the runs still going for the previous commit instead of letting them finish for nothing. The group is github.workflow_ref (workflow file plus ref, refs/pull//merge for pull requests), so two workflows with the same name and two fork pull requests with the same branch name never cancel each other. Release, notify and docs deploy workflows are left as they are. --- .github/workflows/assets.yml | 4 ++++ .github/workflows/coding-standard.yml | 4 ++++ .github/workflows/docs-check.yml | 4 ++++ .github/workflows/mutation-tests-diff.yml | 4 ++++ .github/workflows/mutation-tests.yml | 4 ++++ .github/workflows/phpstan.yml | 4 ++++ .github/workflows/phpunit.yml | 4 ++++ 7 files changed, 28 insertions(+) diff --git a/.github/workflows/assets.yml b/.github/workflows/assets.yml index 99fa73e..ad51bc9 100644 --- a/.github/workflows/assets.yml +++ b/.github/workflows/assets.yml @@ -9,6 +9,10 @@ on: - "[0-9]+.[0-9]+.x" - "renovate/*" +concurrency: + group: ${{ github.workflow_ref }} + cancel-in-progress: true + jobs: assets: name: "Assets" diff --git a/.github/workflows/coding-standard.yml b/.github/workflows/coding-standard.yml index 99c73b4..b2ecd5b 100644 --- a/.github/workflows/coding-standard.yml +++ b/.github/workflows/coding-standard.yml @@ -9,6 +9,10 @@ on: - "[0-9]+.[0-9]+.x" - "renovate/*" +concurrency: + group: ${{ github.workflow_ref }} + cancel-in-progress: true + jobs: static-analysis-coding-standard: name: "Static Analysis by patchlevel/coding-standard" diff --git a/.github/workflows/docs-check.yml b/.github/workflows/docs-check.yml index 5dddced..1726c70 100644 --- a/.github/workflows/docs-check.yml +++ b/.github/workflows/docs-check.yml @@ -8,6 +8,10 @@ on: branches: - "[0-9]+.[0-9]+.x" +concurrency: + group: ${{ github.workflow_ref }} + cancel-in-progress: true + jobs: checkdocs: name: "Check Docs" diff --git a/.github/workflows/mutation-tests-diff.yml b/.github/workflows/mutation-tests-diff.yml index d388b8c..ad9ff5c 100644 --- a/.github/workflows/mutation-tests-diff.yml +++ b/.github/workflows/mutation-tests-diff.yml @@ -5,6 +5,10 @@ name: "Mutation tests on diff" on: pull_request: +concurrency: + group: ${{ github.workflow_ref }} + cancel-in-progress: true + jobs: mutation-tests-diff: name: "Mutation tests on diff" diff --git a/.github/workflows/mutation-tests.yml b/.github/workflows/mutation-tests.yml index f95c633..0cf06f9 100644 --- a/.github/workflows/mutation-tests.yml +++ b/.github/workflows/mutation-tests.yml @@ -9,6 +9,10 @@ on: - "[0-9]+.[0-9]+.x" - "renovate/*" +concurrency: + group: ${{ github.workflow_ref }} + cancel-in-progress: true + jobs: mutation-tests: name: "Mutation tests" diff --git a/.github/workflows/phpstan.yml b/.github/workflows/phpstan.yml index d14d4c5..7106d4e 100644 --- a/.github/workflows/phpstan.yml +++ b/.github/workflows/phpstan.yml @@ -9,6 +9,10 @@ on: - "[0-9]+.[0-9]+.x" - "renovate/*" +concurrency: + group: ${{ github.workflow_ref }} + cancel-in-progress: true + jobs: static-analysis-phpstan: name: "Static Analysis by PHPStan" diff --git a/.github/workflows/phpunit.yml b/.github/workflows/phpunit.yml index 82b96ba..87e3566 100644 --- a/.github/workflows/phpunit.yml +++ b/.github/workflows/phpunit.yml @@ -9,6 +9,10 @@ on: - "[0-9]+.[0-9]+.x" - "renovate/*" +concurrency: + group: ${{ github.workflow_ref }} + cancel-in-progress: true + jobs: phpunit: name: "PHPUnit tests"