wip: e2e in ci
Some checks failed
check / check (push) Successful in 53s
e2e / e2e-chrome (push) Failing after 10s
e2e / e2e-firefox (push) Failing after 12s

This commit is contained in:
2026-08-12 11:46:00 +00:00
parent d23d5df8d6
commit eb6ec80430
5 changed files with 126 additions and 36 deletions

View File

@@ -6,10 +6,13 @@
# Deliberately NOT called by script/check or script/test: REPO_POLICIES.md
# caps make test at 20 seconds and a browser suite does not fit. Run it
# yourself before touching popup views; it is the only check that can see
# a used-but-not-imported identifier blow up at runtime.
# a used-but-not-imported identifier blow up at runtime. The e2e workflow
# in .gitea/workflows/e2e.yml runs it on every push, as a job separate
# from check so the 20-second cap stays intact.
set -eu
ROOT="$(cd "$(dirname "$0")/.." && pwd -P)"
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd -P)"
ROOT="$(cd "$SCRIPT_DIR/.." && pwd -P)"
# mcr.microsoft.com/playwright:v1.56.0-noble, 2026-08-09
#
@@ -49,14 +52,16 @@ main() {
# claim in tests/e2e/network.js and README.md — not deleting the
# probe. The image is pinned by digest, so this can only ever bite
# on a deliberate bump.
docker run --rm \
#
# script/e2e-container is `docker run` with the repo placed at /work;
# it copies rather than mounts, because a bind mount does not resolve
# under Gitea Actions. See the comment at the top of that script.
"$SCRIPT_DIR/e2e-container" \
--ipc=host \
--user "$(id -u):$(id -g)" \
-e HOME=/tmp \
-e PW_EXPERIMENTAL_SERVICE_WORKER_NETWORK_EVENTS=1 \
-e "E2E_TRACE_NETWORK=${E2E_TRACE_NETWORK:-0}" \
-v "$ROOT:/work" \
-w /work \
"$IMAGE" \
node tests/e2e/run.js
}