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 33040d2b722..471fd465a96 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 dcb943f883e..021dfef2ab4 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 61f4eb24229..c07a6c02327 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 f7a141e8dc5..81875c0ec95 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 fe109ac8df8..7dd3446ba74 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 694fdf51afa..9a23426e39d 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 a55e02e9643..f5138aa9a01 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 3467dd5e395..1c7683fd345 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 907f7775a3f..5c0b4a27e68 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 ff8a9037cd0..d565ccb5b18 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 e4b5def4079..957806ff273 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: