From d76abefdeec22b8ce4e5703a8d012caae0063e59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Malfait?= Date: Sat, 18 Oct 2025 10:50:54 +0200 Subject: [PATCH] Fix CI concurrency: prevent test cancellation on main branch (#15188) ## Problem The concurrency rules in CI workflows were cancelling in-progress test runs even on the main branch. This caused inconsistent check counts when multiple commits were pushed in quick succession. ## Solution Updated `cancel-in-progress` in all CI workflows to be conditional: - **On main branch**: Tests run to completion (no cancellation) - **On feature branches**: Tests are cancelled when new commits are pushed (saves CI resources) ## Changes Modified 11 workflow files to use: ```yaml cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} ``` This ensures every commit to main gets fully tested while maintaining efficiency on feature branches. --- .github/workflows/ci-breaking-changes.yaml | 2 +- .github/workflows/ci-cli.yaml | 2 +- .github/workflows/ci-e2e.yaml | 2 +- .github/workflows/ci-emails.yaml | 2 +- .github/workflows/ci-front.yaml | 2 +- .github/workflows/ci-server.yaml | 2 +- .github/workflows/ci-shared.yaml | 2 +- .github/workflows/ci-test-docker-compose.yaml | 2 +- .github/workflows/ci-website.yaml | 2 +- .github/workflows/i18n-pull.yaml | 2 +- .github/workflows/i18n-push.yaml | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci-breaking-changes.yaml b/.github/workflows/ci-breaking-changes.yaml index 33040d2b72..471fd465a9 100644 --- a/.github/workflows/ci-breaking-changes.yaml +++ b/.github/workflows/ci-breaking-changes.yaml @@ -8,7 +8,7 @@ on: concurrency: group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true + cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} env: MAIN_SERVER_PORT: 3000 diff --git a/.github/workflows/ci-cli.yaml b/.github/workflows/ci-cli.yaml index dcb943f883..021dfef2ab 100644 --- a/.github/workflows/ci-cli.yaml +++ b/.github/workflows/ci-cli.yaml @@ -12,7 +12,7 @@ permissions: concurrency: group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true + cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} jobs: changed-files-check: diff --git a/.github/workflows/ci-e2e.yaml b/.github/workflows/ci-e2e.yaml index 61f4eb2422..c07a6c0232 100644 --- a/.github/workflows/ci-e2e.yaml +++ b/.github/workflows/ci-e2e.yaml @@ -12,7 +12,7 @@ permissions: concurrency: group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true + cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} jobs: changed-files-check: diff --git a/.github/workflows/ci-emails.yaml b/.github/workflows/ci-emails.yaml index f7a141e8dc..81875c0ec9 100644 --- a/.github/workflows/ci-emails.yaml +++ b/.github/workflows/ci-emails.yaml @@ -12,7 +12,7 @@ on: concurrency: group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true + cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} jobs: changed-files-check: diff --git a/.github/workflows/ci-front.yaml b/.github/workflows/ci-front.yaml index fe109ac8df..7dd3446ba7 100644 --- a/.github/workflows/ci-front.yaml +++ b/.github/workflows/ci-front.yaml @@ -12,7 +12,7 @@ permissions: concurrency: group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true + cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} env: STORYBOOK_BUILD_CACHE_KEY_FOR_RESTORE_ACTION: storybook-build-depot-ubuntu-24.04-8-runner diff --git a/.github/workflows/ci-server.yaml b/.github/workflows/ci-server.yaml index 694fdf51af..9a23426e39 100644 --- a/.github/workflows/ci-server.yaml +++ b/.github/workflows/ci-server.yaml @@ -12,7 +12,7 @@ permissions: concurrency: group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true + cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} env: SERVER_SETUP_CACHE_KEY: server-setup diff --git a/.github/workflows/ci-shared.yaml b/.github/workflows/ci-shared.yaml index a55e02e964..f5138aa9a0 100644 --- a/.github/workflows/ci-shared.yaml +++ b/.github/workflows/ci-shared.yaml @@ -12,7 +12,7 @@ permissions: concurrency: group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true + cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} jobs: changed-files-check: diff --git a/.github/workflows/ci-test-docker-compose.yaml b/.github/workflows/ci-test-docker-compose.yaml index 3467dd5e39..1c7683fd34 100644 --- a/.github/workflows/ci-test-docker-compose.yaml +++ b/.github/workflows/ci-test-docker-compose.yaml @@ -4,7 +4,7 @@ on: concurrency: group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true + cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} jobs: changed-files-check: diff --git a/.github/workflows/ci-website.yaml b/.github/workflows/ci-website.yaml index 907f7775a3..5c0b4a27e6 100644 --- a/.github/workflows/ci-website.yaml +++ b/.github/workflows/ci-website.yaml @@ -12,7 +12,7 @@ on: concurrency: group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true + cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} jobs: changed-files-check: diff --git a/.github/workflows/i18n-pull.yaml b/.github/workflows/i18n-pull.yaml index ff8a9037cd..d565ccb5b1 100644 --- a/.github/workflows/i18n-pull.yaml +++ b/.github/workflows/i18n-pull.yaml @@ -27,7 +27,7 @@ on: concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} - cancel-in-progress: true + cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} jobs: pull_translations: diff --git a/.github/workflows/i18n-push.yaml b/.github/workflows/i18n-push.yaml index e4b5def407..957806ff27 100644 --- a/.github/workflows/i18n-push.yaml +++ b/.github/workflows/i18n-push.yaml @@ -12,7 +12,7 @@ on: concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} - cancel-in-progress: true + cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} jobs: extract_translations: