From ca1df41d4ee9cd045418a16cf4d72d2fdfd3304c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Qu=C5=8D?= Date: Fri, 17 Jul 2026 02:21:24 +0000 Subject: [PATCH] ci: add concurrency-cancellation groups to CI/test/deploy workflows Superseded workflow runs (rapid pushes to the same ref or PR) currently run to completion, wasting Actions minutes. Add a concurrency group keyed on the workflow name plus head_ref/ref so a newer run cancels the prior in-progress one. The deploy-package publish workflow uses cancel-in-progress: false so an in-flight PyPI release is never interrupted mid-run. --- .github/workflows/ci.yml | 4 ++++ .github/workflows/deploy-package.yml | 6 ++++++ .github/workflows/test-indicators-full.yml | 4 ++++ .github/workflows/test-indicators.yml | 4 ++++ .github/workflows/test-localization.yml | 4 ++++ .github/workflows/test-performance.yml | 4 ++++ 6 files changed, 26 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index eb26eea0..92a4e5cf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,6 +4,10 @@ on: push: pull_request: +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} + cancel-in-progress: true + permissions: contents: read diff --git a/.github/workflows/deploy-package.yml b/.github/workflows/deploy-package.yml index 22df88cb..8b1c45fc 100644 --- a/.github/workflows/deploy-package.yml +++ b/.github/workflows/deploy-package.yml @@ -9,6 +9,12 @@ on: tags: - '[0-9]+.[0-9]+.[0-9]+' +# Deploy/publish workflow: do not cancel an in-flight release mid-run; +# the group key still coalesces duplicate triggers, but running deploys finish. +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} + cancel-in-progress: false + jobs: # production build diff --git a/.github/workflows/test-indicators-full.yml b/.github/workflows/test-indicators-full.yml index b802f433..e82f3622 100644 --- a/.github/workflows/test-indicators-full.yml +++ b/.github/workflows/test-indicators-full.yml @@ -11,6 +11,10 @@ on: - .github/workflows/test-indicators-full.yml workflow_dispatch: +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} + cancel-in-progress: true + permissions: contents: read diff --git a/.github/workflows/test-indicators.yml b/.github/workflows/test-indicators.yml index 06ead104..75a5b29a 100644 --- a/.github/workflows/test-indicators.yml +++ b/.github/workflows/test-indicators.yml @@ -8,6 +8,10 @@ on: branches: ["main"] workflow_dispatch: +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} + cancel-in-progress: true + permissions: contents: read diff --git a/.github/workflows/test-localization.yml b/.github/workflows/test-localization.yml index 29e2daa3..afe3c7fd 100644 --- a/.github/workflows/test-localization.yml +++ b/.github/workflows/test-localization.yml @@ -10,6 +10,10 @@ on: branches: ["*"] workflow_dispatch: +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} + cancel-in-progress: true + permissions: contents: read diff --git a/.github/workflows/test-performance.yml b/.github/workflows/test-performance.yml index 176bad1d..c8e3faac 100644 --- a/.github/workflows/test-performance.yml +++ b/.github/workflows/test-performance.yml @@ -11,6 +11,10 @@ on: - .github/workflows/test-performance.yml workflow_dispatch: +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} + cancel-in-progress: true + permissions: contents: read