mirror of
https://github.com/ether/etherpad-lite.git
synced 2026-07-18 17:13:58 +00:00
The workspace root declares `engines.node: >=25.0.0` and
`engineStrict: true`, so anyone running Node 22 or 24 is hard-blocked
by pnpm at install time. Three places still referenced the old
floor and were testing / supporting a configuration no real user can
reach:
1. `.github/workflows/backend-tests.yml` Windows matrices (both
`withoutpluginsWindows` and `withpluginsWindows`) still had
`node: [22, 24, 25]`. The Linux jobs were already collapsed to
`[25]`; this collapses the Windows side to match. Drops 4
Windows CI cells per develop push (Node 22 × 2 + Node 24 × 2)
that were exercising an unsupported runtime.
2. `src/package.json` engines.node was `>=22.13.0`. Bumped to
`>=25.0.0` to match the workspace root. `pnpm` floor bumped
from `>=11.0.0` to `>=11.1.2` so the inner package agrees with
the root packageManager pin.
3. `.github/workflows/deb-package.yml` setup-node was pinned to
`node-version: '24'`. Every other setup-node call in the
workflows folder is already on 25; this brings the deb job in
line.
Side benefit: the Windows + Node 24 flake addressed in #7748 is now
moot for develop CI — Node 24 isn't tested at all. The `--exit`
mitigation and node-diagnostic-report capture remain in place on
Windows Node 25 as defence in depth in case the same native-crash
class shows up on a different Node line.
Verified locally:
- cd src && pnpm exec vitest run tests/backend-new/specs/backend-tests-flake-mitigation.test.ts
→ 3 passed (3). The mitigation test counts step blocks (4) and
Windows --exit invocations (2), not matrix dimensions, so the
contract is unchanged.
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
337 lines
12 KiB
YAML
337 lines
12 KiB
YAML
name: "Backend tests"
|
|
|
|
# any branch is useful for testing before a PR is submitted
|
|
on:
|
|
push:
|
|
paths-ignore:
|
|
- "doc/**"
|
|
pull_request:
|
|
paths-ignore:
|
|
- "doc/**"
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
|
|
jobs:
|
|
withoutpluginsLinux:
|
|
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)
|
|
name: Linux without plugins
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
# Etherpad requires Node >= 25 (see package.json engines.node).
|
|
node: ${{ fromJSON('[25]') }}
|
|
steps:
|
|
-
|
|
name: Checkout repository
|
|
uses: actions/checkout@v6
|
|
- uses: actions/cache@v5
|
|
name: Cache pnpm store
|
|
with:
|
|
path: ${{ env.PNPM_HOME }}
|
|
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-pnpm-store-
|
|
- uses: pnpm/action-setup@v6
|
|
name: Install pnpm
|
|
with:
|
|
run_install: false
|
|
- name: Use Node.js
|
|
uses: actions/setup-node@v6
|
|
with:
|
|
node-version: ${{ matrix.node }}
|
|
cache: pnpm
|
|
-
|
|
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: pnpm i --frozen-lockfile
|
|
- name: Install admin ui
|
|
working-directory: admin
|
|
run: pnpm install
|
|
- name: Build admin ui
|
|
working-directory: admin
|
|
run: pnpm build
|
|
-
|
|
name: Run the backend tests
|
|
env:
|
|
# --report-on-fatalerror and friends write a Node diagnostic report
|
|
# (V8 stack, libuv handles, OS info) on fatal errors that bypass JS
|
|
# handlers — the failure mode we've been chasing on Windows + Node
|
|
# 24 since PR #7663. Reports land in node-report/ and are uploaded
|
|
# as an artifact if the step fails.
|
|
NODE_OPTIONS: "--report-on-fatalerror --report-uncaught-exception --report-on-signal --report-compact --report-directory=${{ github.workspace }}/node-report"
|
|
run: |
|
|
mkdir -p "${{ github.workspace }}/node-report"
|
|
pnpm test
|
|
- name: Upload Node diagnostic reports on failure
|
|
if: ${{ failure() }}
|
|
uses: actions/upload-artifact@v7
|
|
with:
|
|
name: node-diagnostic-report-${{ runner.os }}-node${{ matrix.node }}-${{ github.job }}
|
|
path: node-report/
|
|
if-no-files-found: ignore
|
|
retention-days: 7
|
|
- name: Run the new vitest tests
|
|
working-directory: src
|
|
run: pnpm run test:vitest
|
|
|
|
withpluginsLinux:
|
|
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)
|
|
name: Linux with Plugins
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
node: ${{ fromJSON('[25]') }}
|
|
steps:
|
|
-
|
|
name: Checkout repository
|
|
uses: actions/checkout@v6
|
|
- uses: actions/cache@v5
|
|
name: Cache pnpm store
|
|
with:
|
|
path: ${{ env.PNPM_HOME }}
|
|
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-pnpm-store-
|
|
- uses: pnpm/action-setup@v6
|
|
name: Install pnpm
|
|
with:
|
|
run_install: false
|
|
- name: Use Node.js
|
|
uses: actions/setup-node@v6
|
|
with:
|
|
node-version: ${{ matrix.node }}
|
|
cache: pnpm
|
|
-
|
|
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: pnpm install --frozen-lockfile
|
|
- name: Build admin ui
|
|
working-directory: admin
|
|
run: pnpm build
|
|
-
|
|
name: Install Etherpad plugins
|
|
run: >
|
|
pnpm add -w
|
|
ep_align
|
|
ep_author_hover
|
|
ep_cursortrace
|
|
ep_font_color
|
|
ep_font_size
|
|
ep_hash_auth
|
|
ep_headings2
|
|
ep_markdown
|
|
ep_readonly_guest
|
|
ep_set_title_on_pad
|
|
ep_spellcheck
|
|
ep_subscript_and_superscript
|
|
ep_table_of_contents
|
|
-
|
|
name: Run the backend tests
|
|
env:
|
|
NODE_OPTIONS: "--report-on-fatalerror --report-uncaught-exception --report-on-signal --report-compact --report-directory=${{ github.workspace }}/node-report"
|
|
run: |
|
|
mkdir -p "${{ github.workspace }}/node-report"
|
|
pnpm test
|
|
- name: Upload Node diagnostic reports on failure
|
|
if: ${{ failure() }}
|
|
uses: actions/upload-artifact@v7
|
|
with:
|
|
name: node-diagnostic-report-${{ runner.os }}-node${{ matrix.node }}-${{ github.job }}
|
|
path: node-report/
|
|
if-no-files-found: ignore
|
|
retention-days: 7
|
|
- name: Run the new vitest tests
|
|
working-directory: src
|
|
run: pnpm run test:vitest
|
|
|
|
# Windows tests only run on push to develop/master, not on PRs
|
|
withoutpluginsWindows:
|
|
env:
|
|
PNPM_HOME: ~\\.pnpm-store
|
|
if: |
|
|
github.event_name != 'pull_request'
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
# Etherpad requires Node >= 25 (see package.json engines.node).
|
|
node: ${{ fromJSON('[25]') }}
|
|
name: Windows without plugins
|
|
runs-on: windows-latest
|
|
steps:
|
|
-
|
|
name: Checkout repository
|
|
uses: actions/checkout@v6
|
|
- uses: actions/cache@v5
|
|
name: Cache pnpm store
|
|
with:
|
|
path: ${{ env.PNPM_HOME }}
|
|
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-pnpm-store-
|
|
- uses: pnpm/action-setup@v6
|
|
name: Install pnpm
|
|
with:
|
|
run_install: false
|
|
- name: Use Node.js
|
|
uses: actions/setup-node@v6
|
|
with:
|
|
node-version: ${{ matrix.node }}
|
|
cache: pnpm
|
|
-
|
|
name: Install all dependencies and symlink for ep_etherpad-lite
|
|
run: pnpm install --frozen-lockfile
|
|
- name: Build admin ui
|
|
working-directory: admin
|
|
run: pnpm build
|
|
-
|
|
name: Fix up the settings.json
|
|
run: |
|
|
powershell -Command "(gc settings.json.template) -replace '\"max\": 10', '\"max\": 10000' | Out-File -encoding ASCII settings.json.holder"
|
|
powershell -Command "(gc settings.json.holder) -replace '\"points\": 10', '\"points\": 1000' | Out-File -encoding ASCII settings.json"
|
|
-
|
|
name: Run the backend tests
|
|
shell: bash
|
|
working-directory: src
|
|
env:
|
|
NODE_OPTIONS: "--report-on-fatalerror --report-uncaught-exception --report-on-signal --report-compact --report-directory=${{ github.workspace }}/node-report"
|
|
run: |
|
|
mkdir -p "${{ github.workspace }}/node-report"
|
|
# --exit forces process.exit(failures) after the suite completes,
|
|
# closing the post-suite event-loop drain window where Windows +
|
|
# Node 24 hard-kills the process. Scoped to Windows so Linux/local
|
|
# runs still surface real handle leaks via natural drain.
|
|
pnpm test -- --exit
|
|
- name: Upload Node diagnostic reports on failure
|
|
if: ${{ failure() }}
|
|
uses: actions/upload-artifact@v7
|
|
with:
|
|
name: node-diagnostic-report-${{ runner.os }}-node${{ matrix.node }}-${{ github.job }}
|
|
path: node-report/
|
|
if-no-files-found: ignore
|
|
retention-days: 7
|
|
- name: Run the new vitest tests
|
|
working-directory: src
|
|
run: pnpm run test:vitest
|
|
|
|
withpluginsWindows:
|
|
env:
|
|
PNPM_HOME: ~\\.pnpm-store
|
|
if: |
|
|
github.event_name != 'pull_request'
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
# Etherpad requires Node >= 25 (see package.json engines.node).
|
|
node: ${{ fromJSON('[25]') }}
|
|
name: Windows with Plugins
|
|
runs-on: windows-latest
|
|
|
|
steps:
|
|
-
|
|
name: Checkout repository
|
|
uses: actions/checkout@v6
|
|
- uses: actions/cache@v5
|
|
name: Cache pnpm store
|
|
with:
|
|
path: ${{ env.PNPM_HOME }}
|
|
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-pnpm-store-
|
|
- uses: pnpm/action-setup@v6
|
|
name: Install pnpm
|
|
with:
|
|
run_install: false
|
|
- name: Use Node.js
|
|
uses: actions/setup-node@v6
|
|
with:
|
|
node-version: ${{ matrix.node }}
|
|
cache: pnpm
|
|
- name: Install dependencies
|
|
run: pnpm install
|
|
- name: Build admin ui
|
|
working-directory: admin
|
|
run: pnpm build
|
|
-
|
|
name: Install Etherpad plugins
|
|
run: >
|
|
pnpm add -w
|
|
ep_align
|
|
ep_author_hover
|
|
ep_cursortrace
|
|
ep_font_color
|
|
ep_font_size
|
|
ep_hash_auth
|
|
ep_headings2
|
|
ep_markdown
|
|
ep_readonly_guest
|
|
ep_set_title_on_pad
|
|
ep_spellcheck
|
|
ep_subscript_and_superscript
|
|
ep_table_of_contents
|
|
# Etherpad core dependencies must be installed after installing the
|
|
# plugin's dependencies, otherwise npm will try to hoist common
|
|
# dependencies by removing them from src/node_modules and installing them
|
|
# in the top-level node_modules. As of v6.14.10, npm's hoist logic appears
|
|
# to be buggy, because it sometimes removes dependencies from
|
|
# src/node_modules but fails to add them to the top-level node_modules.
|
|
# Even if npm correctly hoists the dependencies, the hoisting seems to
|
|
# confuse tools such as `npm outdated`, `npm update`, and some ESLint
|
|
# rules.
|
|
-
|
|
name: Install all dependencies and symlink for ep_etherpad-lite
|
|
run: pnpm install --frozen-lockfile
|
|
-
|
|
name: Fix up the settings.json
|
|
run: |
|
|
powershell -Command "(gc settings.json.template) -replace '\"max\": 10', '\"max\": 10000' | Out-File -encoding ASCII settings.json.holder"
|
|
powershell -Command "(gc settings.json.holder) -replace '\"points\": 10', '\"points\": 1000' | Out-File -encoding ASCII settings.json"
|
|
-
|
|
name: Run the backend tests
|
|
shell: bash
|
|
working-directory: src
|
|
env:
|
|
NODE_OPTIONS: "--report-on-fatalerror --report-uncaught-exception --report-on-signal --report-compact --report-directory=${{ github.workspace }}/node-report"
|
|
run: |
|
|
mkdir -p "${{ github.workspace }}/node-report"
|
|
# --exit forces process.exit(failures) after the suite completes,
|
|
# closing the post-suite event-loop drain window where Windows +
|
|
# Node 24 hard-kills the process. Scoped to Windows so Linux/local
|
|
# runs still surface real handle leaks via natural drain.
|
|
pnpm test -- --exit
|
|
- name: Upload Node diagnostic reports on failure
|
|
if: ${{ failure() }}
|
|
uses: actions/upload-artifact@v7
|
|
with:
|
|
name: node-diagnostic-report-${{ runner.os }}-node${{ matrix.node }}-${{ github.job }}
|
|
path: node-report/
|
|
if-no-files-found: ignore
|
|
retention-days: 7
|
|
- name: Run the new vitest tests
|
|
working-directory: src
|
|
run: pnpm run test:vitest
|