mirror of
https://github.com/ether/etherpad-lite.git
synced 2026-07-17 16:47:05 +00:00
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:
parent
bd73785431
commit
f8e6b20f43
4 changed files with 34 additions and 21 deletions
16
.github/workflows/backend-tests.yml
vendored
16
.github/workflows/backend-tests.yml
vendored
|
|
@ -27,7 +27,8 @@ jobs:
|
|||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
node: [">=20.0.0 <21.0.0", ">=22.0.0 <23.0.0", ">=24.0.0 <25.0.0"]
|
||||
# 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"]') }}
|
||||
steps:
|
||||
-
|
||||
name: Checkout repository
|
||||
|
|
@ -83,7 +84,7 @@ jobs:
|
|||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
node: [">=20.0.0 <21.0.0", ">=22.0.0 <23.0.0", ">=24.0.0 <25.0.0"]
|
||||
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"]') }}
|
||||
steps:
|
||||
-
|
||||
name: Checkout repository
|
||||
|
|
@ -138,14 +139,12 @@ jobs:
|
|||
working-directory: src
|
||||
run: gnpm run test:vitest --runtimeVersion="${{ matrix.node }}"
|
||||
|
||||
# Windows tests only run on push to develop/master, not on PRs
|
||||
withoutpluginsWindows:
|
||||
env:
|
||||
PNPM_HOME: ~\\.pnpm-store
|
||||
# run on pushes to any branch
|
||||
# run on PRs from external forks
|
||||
if: |
|
||||
(github.event_name != 'pull_request')
|
||||
|| (github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id)
|
||||
github.event_name != 'pull_request'
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
|
|
@ -193,11 +192,8 @@ jobs:
|
|||
withpluginsWindows:
|
||||
env:
|
||||
PNPM_HOME: ~\\.pnpm-store
|
||||
# run on pushes to any branch
|
||||
# run on PRs from external forks
|
||||
if: |
|
||||
(github.event_name != 'pull_request')
|
||||
|| (github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id)
|
||||
github.event_name != 'pull_request'
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
|
|
|
|||
12
.github/workflows/frontend-admin-tests.yml
vendored
12
.github/workflows/frontend-admin-tests.yml
vendored
|
|
@ -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:
|
||||
|
|
|
|||
18
.github/workflows/frontend-tests.yml
vendored
18
.github/workflows/frontend-tests.yml
vendored
|
|
@ -47,7 +47,7 @@ jobs:
|
|||
- name: Run the frontend tests
|
||||
shell: bash
|
||||
run: |
|
||||
gnpm run prod &
|
||||
gnpm run prod > /tmp/etherpad-server.log 2>&1 &
|
||||
connected=false
|
||||
can_connect() {
|
||||
curl -sSfo /dev/null http://localhost:9001/ || return 1
|
||||
|
|
@ -61,6 +61,13 @@ jobs:
|
|||
cd src
|
||||
gnpm exec playwright install chromium --with-deps
|
||||
gnpm run test-ui --project=chromium
|
||||
- name: Upload server log on failure
|
||||
uses: actions/upload-artifact@v7
|
||||
if: failure()
|
||||
with:
|
||||
name: server-log-chrome
|
||||
path: /tmp/etherpad-server.log
|
||||
retention-days: 7
|
||||
- uses: actions/upload-artifact@v7
|
||||
if: always()
|
||||
with:
|
||||
|
|
@ -99,7 +106,7 @@ jobs:
|
|||
- name: Run the frontend tests
|
||||
shell: bash
|
||||
run: |
|
||||
gnpm run prod &
|
||||
gnpm run prod > /tmp/etherpad-server.log 2>&1 &
|
||||
connected=false
|
||||
can_connect() {
|
||||
curl -sSfo /dev/null http://localhost:9001/ || return 1
|
||||
|
|
@ -113,6 +120,13 @@ jobs:
|
|||
cd src
|
||||
gnpm exec playwright install firefox --with-deps
|
||||
gnpm run test-ui --project=firefox
|
||||
- name: Upload server log on failure
|
||||
uses: actions/upload-artifact@v7
|
||||
if: failure()
|
||||
with:
|
||||
name: server-log-firefox
|
||||
path: /tmp/etherpad-server.log
|
||||
retention-days: 7
|
||||
- uses: actions/upload-artifact@v7
|
||||
if: always()
|
||||
with:
|
||||
|
|
|
|||
|
|
@ -27,7 +27,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:
|
||||
-
|
||||
name: Check out latest release
|
||||
|
|
@ -56,12 +57,6 @@ jobs:
|
|||
with:
|
||||
packages: libreoffice libreoffice-pdfimport
|
||||
version: 1.0
|
||||
-
|
||||
name: Install libreoffice
|
||||
uses: awalsh128/cache-apt-pkgs-action@v1.6.0
|
||||
with:
|
||||
packages: libreoffice libreoffice-pdfimport
|
||||
version: 1.0
|
||||
-
|
||||
name: Install all dependencies and symlink for ep_etherpad-lite
|
||||
run: gnpm install --frozen-lockfile --runtimeVersion="${{ matrix.node }}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue