Files
LLeMbas-Desktop/.github/workflows/ci.yml
T
HomerandClaude Opus 5.5 a91394f71d
ci / ui (push) Waiting to run
ci / check (push) Failing after 3s
ci / start (push) Failing after 2s
CI: the page under a headless browser on every push (tests/ui, the ui job)
A job of its own on ubuntu-24.04: Node 20, playwright-core 1.65.0 installed
into the runner's temp directory for the run (the repository keeps no
package.json), its own Chromium with the system libraries it needs, then
node tests/ui/run.mjs. Nothing is built and no server started.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 09:11:21 +00:00

97 lines
3.9 KiB
YAML

# Checks on every push to main and dev and every pull request: formatting, lints, tests, the
# 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:
branches: [main, dev]
pull_request:
permissions:
contents: read
jobs:
check:
runs-on: ubuntu-22.04
timeout-minutes: 45
steps:
- uses: actions/checkout@v5
- name: System libraries (WebKitGTK, the tray)
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.1-dev libayatana-appindicator3-dev librsvg2-dev libxdo-dev
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
components: rustfmt, clippy
cache-workspaces: src-tauri
- name: Nothing private in a public repository
run: scripts/hygiene.sh
- name: The bundled LLeMbas CLI, verified
run: scripts/fetch-cli.sh
- name: Formatting
working-directory: src-tauri
run: cargo fmt --check
- name: Lints
working-directory: src-tauri
run: cargo clippy --locked --all-targets -- -D warnings
- name: Tests
working-directory: src-tauri
run: cargo test --locked
- name: The page's scripts parse, and none sets HTML
run: scripts/check-ui.sh
- 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
# one) and an empty home, so it starts at its first-run page. Built with the custom protocol on,
# as a release is, so the page is the bundled ui/ and not a development server.
start:
runs-on: ubuntu-22.04
timeout-minutes: 60
steps:
- uses: actions/checkout@v5
- name: System libraries, and an X server and a Wayland compositor without a screen
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.1-dev libayatana-appindicator3-dev librsvg2-dev libxdo-dev \
xvfb weston dbus libgl1-mesa-dri
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
cache-workspaces: src-tauri
- name: The bundled LLeMbas CLI, verified
run: scripts/fetch-cli.sh
- name: Build (debug, with the bundled page)
working-directory: src-tauri
run: cargo build --locked --features tauri/custom-protocol
- name: Starts on X11
run: scripts/ci-start.sh x11
- name: Starts on Wayland
run: scripts/ci-start.sh wayland