devops: use Playwright Docker image for unit test job #13
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
The unit test job runs on
ubuntu-latestand always pays the cost of installing Playwright system packages via apt (npx playwright install-deps chromium), even on a cache hit. OS packages can't be cached — so every run downloads and installs libglib, libnss, libatk, and friends regardless.This makes the unit test job consistently slow and adds unnecessary network I/O on every push.
Solution
Switch the
unit-testsjob to run inside the official Playwright Docker container image. The image ships with Chromium and all system dependencies pre-installed — no install or cache steps needed at all.Changes required
container:directive to theunit-testsjob pointing to a pinned Playwright image versionInstall Playwright Chromium + system depsstepInstall Playwright system deps (browser binary already cached)stepCache Playwright browsersstep (no longer needed)Cache node_modulesstep (still useful)actions/setup-node— the Playwright image already ships with Node.jspackage.jsonto avoid browser/driver mismatchesNotes
frontend/package.jsonfor the exact Playwright version to match the image tagAcceptance criteria
playwright installorinstall-depscommands