Apply the #109 re-review: fork guard on the unit job, gated reachability check, renderer liveness assertion.
act_runner mounts /var/run/docker.sock into every container job, so the fork guard has to cover the unit job too. The e2e comment now states the blast radius of the host DOCKER-USER exception instead of the removed container.options. Playwright deps are narrowed to chromium, which is what Electron uses, and the homeserver reachability curl gates with -f so a non-2xx fails the job. The login test claimed "without crashing the app" but asserted only that the body had text, which is true for an error page. It now asserts no uncaught renderer pageerror, and toHaveValue after the homeserver commit proves fill() actually stuck.
This commit is contained in:
@@ -5,6 +5,9 @@ on:
|
||||
|
||||
jobs:
|
||||
unit:
|
||||
# act_runner mounts /var/run/docker.sock into every container job, so a fork PR reaches
|
||||
# the Docker daemon on the runner host. Both jobs need the same guard.
|
||||
if: github.event.pull_request.head.repo.full_name == github.repository
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
@@ -28,8 +31,9 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
# Needs the DOCKER-USER exception on the runner host: ruv.wtf is a macvlan interface on a
|
||||
# container there, so the reply to a bridge-networked job arrives on that container's bridge
|
||||
# and Docker's inter-bridge isolation drops it. act_runner ignores --network in
|
||||
# container.options, so the exception lives on the host.
|
||||
# and Docker's inter-bridge isolation drops it. The exception is host-wide, so it also covers
|
||||
# fork PR jobs, and the bridge name is Docker-generated: recreating the caddy container
|
||||
# renames it and the test fails closed.
|
||||
env:
|
||||
# Dedicated test account on the homeserver, not a personal one.
|
||||
E2E_HOMESERVER: ruv.wtf
|
||||
@@ -56,18 +60,20 @@ jobs:
|
||||
working-directory: ./cinny
|
||||
run: npm ci --prefer-offline
|
||||
|
||||
# Electron needs system libraries the runner image does not ship.
|
||||
# Electron needs system libraries the runner image does not ship. Chromium only:
|
||||
# Electron uses the Chromium codebase, so firefox and webkit deps are not needed.
|
||||
- name: Install system libraries for Electron
|
||||
run: npx playwright install-deps
|
||||
run: npx playwright install-deps chromium
|
||||
|
||||
# The runner image has no xvfb and no fresh apt lists.
|
||||
- name: Ensure a display for Electron
|
||||
run: command -v xvfb-run >/dev/null || (sudo apt-get update && sudo apt-get install -y xvfb)
|
||||
|
||||
# The login form only renders after the auth-flows request succeeds, so an
|
||||
# unreachable homeserver shows up as a 30s locator timeout. Fail fast instead.
|
||||
# unreachable homeserver shows up as a 30s locator timeout. Fail fast instead, on
|
||||
# connect failure or a non-2xx status.
|
||||
- name: Homeserver reachable from the runner
|
||||
run: curl -sS --max-time 20 -o /dev/null -w '%{http_code}\n' "https://$E2E_HOMESERVER/.well-known/matrix/client"
|
||||
run: curl -sSf --max-time 20 -o /dev/null -w '%{http_code}\n' "https://$E2E_HOMESERVER/.well-known/matrix/client"
|
||||
|
||||
- name: Run login E2E
|
||||
run: xvfb-run -a npm run test:e2e
|
||||
|
||||
Reference in New Issue
Block a user