mirror of
https://github.com/ether/etherpad-lite.git
synced 2026-07-17 16:47:05 +00:00
Bumps the workflow Node version (PR matrix → [25], full push matrix stays at [22, 24, 25]) and the pinned pnpm to 11.1.2 with a matching `engines.pnpm` minimum. End-users install pnpm the same way they always have (`npm install -g pnpm` works on Node 25 — only Corepack was dropped from the official Node 25 distribution). Also includes two workflow fixes that were entangled with the Node-version edits in the same files: - `upgrade-from-latest-release.yml` now actually checks out the latest release tag instead of `ref: develop #FIXME`, so the job finally exercises what its name implies. - `installer-test.yml` resolves `ETHERPAD_REPO` / `ETHERPAD_BRANCH` from the PR head when running on a fork, so the smoke test exercises the PR branch rather than the base. Verified end-to-end against `node:25-bookworm-slim` (no corepack): `npm install -g pnpm` → `pnpm i` → `pnpm run build:etherpad` → `pnpm run prod` boots and listens on 9001. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
103 lines
3.2 KiB
YAML
103 lines
3.2 KiB
YAML
name: "Frontend admin tests"
|
|
|
|
on:
|
|
push:
|
|
paths-ignore:
|
|
- 'doc/**'
|
|
pull_request:
|
|
paths-ignore:
|
|
- 'doc/**'
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
withplugins:
|
|
env:
|
|
PNPM_HOME: ~/.pnpm-store
|
|
name: with plugins
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
# PRs: single Node version. Push: full matrix.
|
|
node: ${{ github.event_name == 'pull_request' && fromJSON('[25]') || fromJSON('[22, 24, 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 all dependencies and symlink for ep_etherpad-lite
|
|
run: pnpm i
|
|
- name: Cache Playwright browsers
|
|
uses: actions/cache@v5
|
|
id: playwright-cache
|
|
with:
|
|
path: ~/.cache/ms-playwright
|
|
key: ${{ runner.os }}-playwright-${{ hashFiles('src/package.json') }}
|
|
- name: Install Playwright browsers
|
|
if: steps.playwright-cache.outputs.cache-hit != 'true'
|
|
run: cd src && npx playwright install
|
|
- name: Install Playwright system dependencies
|
|
run: cd src && npx playwright install-deps
|
|
-
|
|
name: Create settings.json
|
|
run: cp settings.json.template settings.json
|
|
-
|
|
name: Write custom settings.json that enables the Admin UI tests
|
|
run: "sed -i 's/\"enableAdminUITests\": false/\"enableAdminUITests\": true,\\n\"users\":{\"admin\":{\"password\":\"changeme1\",\"is_admin\":true}}/' settings.json"
|
|
-
|
|
name: Disable import/export rate limiting
|
|
run: |
|
|
sed -e '/^ *"importExportRateLimiting":/,/^ *\}/ s/"max":.*/"max": 100000000/' -i settings.json
|
|
- name: Build admin frontend
|
|
working-directory: admin
|
|
run: |
|
|
pnpm run build
|
|
- name: Run the frontend admin tests
|
|
shell: bash
|
|
run: |
|
|
pnpm run prod > /tmp/etherpad-server.log 2>&1 &
|
|
connected=false
|
|
can_connect() {
|
|
curl -sSfo /dev/null http://localhost:9001/ || return 1
|
|
connected=true
|
|
}
|
|
now() { date +%s; }
|
|
start=$(now)
|
|
while [ $(($(now) - $start)) -le 15 ] && ! can_connect; do
|
|
sleep 1
|
|
done
|
|
cd src
|
|
pnpm run test-admin
|
|
- 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:
|
|
name: playwright-report-${{ matrix.node }}
|
|
path: src/playwright-report/
|
|
retention-days: 30
|