Skip to content

Commit e7aef5c

Browse files
justin808claude
andauthored
fix: add concurrency groups to long-running CI workflows (#3133)
## Summary Closes #3129 - Adds `concurrency` groups with `cancel-in-progress: true` to four long-running CI workflows: `gem-tests.yml`, `integration-tests.yml`, `examples.yml`, and `playwright.yml` - When multiple commits push to the same PR branch, stale runs are cancelled automatically, reducing runner pool contention and queue times (~5-10 minutes saved during peak activity) - Uses the standard GitHub pattern: `group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}` ## Test plan - [ ] Verify CI passes on this PR - [ ] Push a second commit to this PR branch while CI is running to confirm old runs get cancelled 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Low risk workflow-only change that primarily affects CI scheduling; main risk is inadvertently canceling desired parallel runs within the same PR if grouping is too broad. > > **Overview** > Adds **workflow-level `concurrency`** to `examples.yml`, `gem-tests.yml`, `integration-tests.yml`, and `playwright.yml` so that **new commits on the same PR cancel prior in-progress runs**. > > Concurrency grouping keys off the PR number (or falls back to the commit SHA), with `cancel-in-progress` enabled only for `pull_request` events to avoid canceling main-branch runs. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit b33ddc6. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Added workflow concurrency configuration across multiple CI/CD pipelines to automatically cancel redundant runs when new commits are pushed. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 18c2f48 commit e7aef5c

4 files changed

Lines changed: 16 additions & 0 deletions

File tree

.github/workflows/examples.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ name: Generator tests # TODO needs to be duplicated for RoR Pro
33
permissions:
44
contents: read
55

6+
concurrency:
7+
group: ${{ github.event.pull_request.number && format('{0}-pr-{1}', github.workflow, github.event.pull_request.number) || format('{0}-{1}', github.workflow, github.sha) }}
8+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
9+
610
on:
711
push:
812
branches:

.github/workflows/gem-tests.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ name: Rspec test for gem
33
permissions:
44
contents: read
55

6+
concurrency:
7+
group: ${{ github.event.pull_request.number && format('{0}-pr-{1}', github.workflow, github.event.pull_request.number) || format('{0}-{1}', github.workflow, github.sha) }}
8+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
9+
610
on:
711
push:
812
branches:

.github/workflows/integration-tests.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ name: Integration Tests
33
permissions:
44
contents: read
55

6+
concurrency:
7+
group: ${{ github.event.pull_request.number && format('{0}-pr-{1}', github.workflow, github.event.pull_request.number) || format('{0}-{1}', github.workflow, github.sha) }}
8+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
9+
610
on:
711
push:
812
branches:

.github/workflows/playwright.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ name: Playwright E2E Tests
33
permissions:
44
contents: read
55

6+
concurrency:
7+
group: ${{ github.event.pull_request.number && format('{0}-pr-{1}', github.workflow, github.event.pull_request.number) || format('{0}-{1}', github.workflow, github.sha) }}
8+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
9+
610
on:
711
push:
812
branches: [main]

0 commit comments

Comments
 (0)