diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 95aca3f..3c3bc8d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,7 +1,8 @@ # Checks on every push to main and dev and every pull request: formatting, lints, tests, the -# page's scripts, the pins (tokens, CodeMirror), the public-repository hygiene -- and the app -# started for real, on X11 and on Wayland, to prove it gets as far as its window. The packages -# are built only by release.yml, from a tag. +# page's scripts, the pins (tokens, CodeMirror, xterm), the public-repository hygiene, the page +# itself under a headless browser (tests/ui) -- and the app started for real, on X11 and on +# Wayland, to prove it gets as far as its window. The packages are built only by release.yml, +# from a tag. name: ci on: push: @@ -40,11 +41,32 @@ jobs: run: cargo test --locked - name: The page's scripts parse, and none sets HTML run: scripts/check-ui.sh - - name: The design tokens and CodeMirror are the server's, as pinned + - name: The design tokens, CodeMirror and xterm are the server's, as pinned run: | scripts/fetch-tokens.sh scripts/fetch-vendor.sh + # The page (ui/) under a headless Chromium, against a stand-in for the app's bridge + # (tests/ui/mock-tauri.js) with the server's answers as a table: nothing is built and no server + # is started. Playwright is the library only, installed for the run and not a dependency of + # the repository (it has no package.json), with the Chromium it was made for. + ui: + runs-on: ubuntu-24.04 + timeout-minutes: 20 + steps: + - uses: actions/checkout@v5 + - uses: actions/setup-node@v4 + with: + node-version: 20 + - name: Playwright and its Chromium + run: | + npm install --no-save --no-package-lock --prefix "$RUNNER_TEMP/pw" playwright-core@1.65.0 + node "$RUNNER_TEMP/pw/node_modules/playwright-core/cli.js" install --with-deps chromium + - name: The page under a headless browser + env: + NODE_PATH: ${{ runner.temp }}/pw/node_modules + run: node tests/ui/run.mjs + # The app started for real: it must still be running after 25 seconds (timeout's 124), and its # log must not say it stopped. Once under Xvfb (X11) and once under a headless Weston (Wayland, # GTK's Wayland backend forced), each with a session bus (the tray and the notifications want diff --git a/CHANGELOG.md b/CHANGELOG.md index ce85afd..ba9372b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -42,7 +42,8 @@ All notable changes to LLeMbas Desktop. The format follows every second. From a server that sends no such line (before 2.0.0-beta.8), the app shows the server's own words as before. Translations come with the server's. - `tests/ui/`: the page under a headless browser against a stand-in for the app's bridge, with - the server's answers as a table (`node tests/ui/run.mjs`, needs Playwright and a Chromium). + the server's answers as a table (`node tests/ui/run.mjs`, needs Playwright and a Chromium). CI + runs it on every push (the `ui` job), with Playwright and its Chromium installed for the run. ## [1.0.0-beta.5] — 2026-11-09