From 88f50470d3fac26a1f590f030095c22c4b60efd3 Mon Sep 17 00:00:00 2001 From: David Badura Date: Sat, 17 Oct 2026 19:37:30 +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/backward-compatibility-check.yml | 4 ++++ .github/workflows/coding-standard.yml | 4 ++++ .github/workflows/docs-check.yml | 4 ++++ .github/workflows/mutation-tests.yml | 4 ++++ .github/workflows/phpstan.yml | 4 ++++ .github/workflows/unit.yml | 4 ++++ 6 files changed, 24 insertions(+) diff --git a/.github/workflows/backward-compatibility-check.yml b/.github/workflows/backward-compatibility-check.yml index afa5088..a75aafa 100644 --- a/.github/workflows/backward-compatibility-check.yml +++ b/.github/workflows/backward-compatibility-check.yml @@ -5,6 +5,10 @@ name: "Backward Compatibility Check" on: pull_request: +concurrency: + group: ${{ github.workflow_ref }} + cancel-in-progress: true + jobs: roave-backwards-compatibility-check: name: "Backward Compatibility Check" diff --git a/.github/workflows/coding-standard.yml b/.github/workflows/coding-standard.yml index 2628098..7009868 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 ec7b7f6..39cf3ac 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.yml b/.github/workflows/mutation-tests.yml index 38405bb..a59f942 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 d55aac2..2a9d2db 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/unit.yml b/.github/workflows/unit.yml index 93ac525..c95f9dc 100644 --- a/.github/workflows/unit.yml +++ b/.github/workflows/unit.yml @@ -9,6 +9,10 @@ on: - "[0-9]+.[0-9]+.x" - "renovate/*" +concurrency: + group: ${{ github.workflow_ref }} + cancel-in-progress: true + jobs: phpunit: name: "Unit tests"