Web QA pipeline
Every pull request plays the real wasm build in headless Chromium, in parallel shards, and fails on any WebAssembly error. A failure leaves screenshots and logs as CI artifacts.
What runs
scripts/web-qa.json lists the scenarios; scripts/web-qa.js runs one shard of them. CI job web-qa (matrix of 8 parts, fail-fast: false, --jobs 2). Scenarios are spread over the parts by the durations in scripts/web-qa-weights.json (60 s when a scenario is not listed), so a new scenario needs no CI edit. --shard <name> still selects one group of the table below:
| Shard | Scenarios |
|---|---|
ui | title to fight flow, Arcade click, story intro, epilogue |
mobile | touch menu, touch controls in a fight, in-engine smoke on a Pixel 7 viewport |
engine | in-engine smoke (?smoke=1): boot, menus, select, training, 5v5, story; plus the guard self-test |
loading | M.U.G.E.N import (kfm), native fighters with awakenings, power arena, audio unlock, fatal-trap screen (unreachable) |
match-1, match-2 | full matches in two halves (Web match smoke) |
The guard
Every scenario runs with scripts/web-guard.js preloaded. It watches every page and fails the run, even when the script itself forgot to, on:
panicked,PanicHookInfo,unreachable executedorrenderbufferStorageMultisamplein the console;gpu error:(the wgpu error handler inume-shell);- an uncaught
pageerroror a Chromium crash.
On the first problems it saves problem-N.png immediately, and a final-N.png before the browser closes. It also writes console.log (every console line with the time and page) and network.log (failed requests and HTTP 400+). fatal-trap sets expectFatal because it throws a trap on purpose, so there the guard only records.
Artifacts
Each shard uploads web-qa-<shard> (always, kept 7 days): summary.md, summary.json and one folder per scenario with output.log, console.log, network.log, guard.json, shots/ and the .png files. The summary is also written to the job summary page with the failing problems and the last output lines.
Run it locally
./scripts/build-web.sh
npm install --no-save playwright@1.56.1 && npx playwright install chromium
node scripts/web-qa.js --dist web/dist --out web-qa-report --shard ui
node scripts/web-qa.js --only fatal-trap,engine-smoke --jobs 2
Software GL is slow: keep --jobs at 1 or 2 locally. For a one-off page add ?debug=1 and read the console.
Adding a scenario
- Write
scripts/web-<name>-smoke.jsthat takes the dist folder as its first argument and exits non-zero on failure. - Add it to
scripts/web-qa.jsonwith a shard, or list it underexcludedwith the reason (network, manual tool).
scripts/web-qa.test.mjs fails when a web-*-smoke.js is neither covered nor excluded, or when the part matrix in ci.yml does not cover every scenario exactly once.
Visual tour
node scripts/web-tour.js web/dist <out> walks title, menu, every utility screen, select, stages, VS, fight and pause with real keys and saves a numbered screenshot per step (TOUR_MOBILE=1 uses a phone in landscape, TOUR_LANG=pt-BR sets the browser locale). It fails on panics, navigation or browser errors, or a fight that never starts; the screenshots are for review and PR evidence.