chore: reduce CI matrix for PRs to prevent runner exhaustion#7463
chore: reduce CI matrix for PRs to prevent runner exhaustion#7463JohnMcLear merged 1 commit intoether:developfrom
Conversation
Review Summary by QodoOptimize CI matrix for PRs to prevent runner exhaustion
WalkthroughsDescription• Reduce PR CI matrix from ~25 to ~10 jobs by testing only Node 24 on Linux • Disable Windows tests for PRs; run full matrix only on push to develop • Conditionally set Node versions based on event type (PR vs push) • Remove duplicate libreoffice installation step in upgrade workflow Diagramflowchart LR
PR["Pull Request Event"]
PUSH["Push to develop Event"]
PR -- "Node 24 Linux only" --> REDUCED["Reduced Matrix<br/>~10 jobs"]
PUSH -- "Full matrix<br/>3 Node × 2 platforms" --> FULL["Full Matrix<br/>~25 jobs"]
REDUCED --> FAST["Quick Feedback"]
FULL --> COVERAGE["Complete Coverage"]
File Changes1. .github/workflows/backend-tests.yml
|
Code Review by Qodo
1. Backend PRs still full-matrix
|
PRs now run a minimal test matrix; full matrix runs on push to develop. Changes: - Backend tests: PRs test on Node 24 only (Linux). Windows tests only run on push to develop. Reduces from 12 to 2 jobs for PRs. - Upgrade-from-latest-release: PRs test on Node 24 only (1 job vs 3). - Frontend admin tests: PRs test on Node 24 only (1 job vs 3). This reduces PR CI from ~25 jobs to ~10, preventing runner exhaustion when multiple PRs are merged in succession. The full matrix (3 Node versions × Linux + Windows) still runs on every push to develop. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
e14f579 to
a2df63c
Compare
| # PRs: test on latest Node only. Push to develop: full matrix. | ||
| node: ${{ github.event_name == 'pull_request' && fromJSON('[">=24.0.0 <25.0.0"]') || fromJSON('[">=20.0.0 <21.0.0", ">=22.0.0 <23.0.0", ">=24.0.0 <25.0.0"]') }} |
There was a problem hiding this comment.
1. Backend prs still full-matrix 🐞 Bug ≡ Correctness
In backend-tests.yml, the reduced Node matrix is selected only for pull_request events, but the Linux jobs skip same-repo pull_request events, so internal PRs run via push using the full Node matrix (and Windows jobs). This defeats the intended CI job reduction for typical PRs.
Agent Prompt
## Issue description
`backend-tests.yml` reduces the matrix only when `github.event_name == 'pull_request'`, but same-repo PR jobs are skipped on the `pull_request` event, so internal PR CI runs on `push` and always selects the full matrix.
## Issue Context
The Linux jobs have an `if:` guard that avoids running on internal `pull_request` events. With the new event-based matrix selection, that guard means the reduced PR matrix won't apply to internal PR branches.
## Fix Focus Areas
- .github/workflows/backend-tests.yml[4-32]
- .github/workflows/backend-tests.yml[20-25]
## Suggested fix direction
Change the matrix selection (and any heavy jobs such as Windows) to key off branch/ref (e.g., run full matrix only on `push` to `develop`/`master`, and run reduced matrix for PRs and non-default-branch pushes), OR remove/adjust the job-level `if:` so internal PRs actually run under `pull_request` and can use the reduced matrix.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
Summary
Two CI improvements:
1. Reduce PR matrix to prevent runner exhaustion
PRs now run a minimal test matrix; full matrix runs on push to develop.
2. Clean up Playwright CI output
Redirect Etherpad server stdout/stderr to
/tmp/etherpad-server.logduring frontend tests so Playwright's test list output isn't interleaved with server log noise (ENTER, LEAVE, INFO, etc.). Server logs are uploaded as artifacts on failure for debugging.🤖 Generated with Claude Code