Install browser system packages from the cache when the Ubuntu mirror is down

Merged
BI
16h ago
+315-21

Requested by josh · project thread

Why

Since about 14:30Z on 11 Nov every browser job on #1606, #1608, #1622, #1623, #1626 and #1630 fails in browser setup. The runner cannot resolve azure.archive.ubuntu.com, and Playwright's install-deps always runs apt-get update first, so it times out. Nothing else on those PRs is red.

What changes

  • scripts/ward-ci-public/install-chromium.mjs: when the seed step has put cached .deb files in /var/cache/apt/archives (the main-saved cache for this exact runner image hits on every job), install them as local files with apt-get install --no-download, install the browsers, then launch each one. Pass only if they all launch. Any failure falls back to the existing online path unchanged.
  • ward-flow.yml shared-mode job: also restore and seed WebKit's cached packages, and install both engines through the same script (it called playwright install --with-deps webkit directly before).
  • Two new unit tests for the offline path and its fallback.

Evidence

  • Local: the 3 setup test files (43 tests) and every test file that reads ward-flow.yml (22 files, 309 tests) pass.
  • Not yet proven: that the offline install works on a hosted runner. This PR's own CI run is that proof.

Generated by Claude Code