chore: reduce CI matrix for PRs to prevent runner exhaustion (#7463)

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>
This commit is contained in:
John McLear 2026-04-05 10:14:20 +01:00 committed by GitHub
parent bd73785431
commit f8e6b20f43
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 34 additions and 21 deletions

View file

@ -21,7 +21,8 @@ jobs:
strategy:
fail-fast: false
matrix:
node: [20, 22, 24]
# PRs: single Node version. Push: full matrix.
node: ${{ github.event_name == 'pull_request' && fromJSON('[24]') || fromJSON('[20, 22, 24]') }}
steps:
-
@ -77,7 +78,7 @@ jobs:
- name: Run the frontend admin tests
shell: bash
run: |
gnpm run prod --runtimeVersion="${{ matrix.node }}" &
gnpm run prod --runtimeVersion="${{ matrix.node }}" > /tmp/etherpad-server.log 2>&1 &
connected=false
can_connect() {
curl -sSfo /dev/null http://localhost:9001/ || return 1
@ -90,6 +91,13 @@ jobs:
done
cd src
gnpm run test-admin --runtimeVersion="${{ matrix.node }}"
- name: Upload server log on failure
uses: actions/upload-artifact@v7
if: failure()
with:
name: server-log-admin-${{ matrix.node }}
path: /tmp/etherpad-server.log
retention-days: 7
- uses: actions/upload-artifact@v7
if: always()
with: