fix(ci): give gitlab perf job a discoverable chromium (ADR-0028)
CI / scan (pull_request) Successful in 2m48s
CI / commits (pull_request) Successful in 2m59s
CI / check (pull_request) Successful in 3m13s
CI / a11y (pull_request) Successful in 1m34s
CI / perf (pull_request) Successful in 6m22s

The perf job ran on the Playwright image, which bundles Chromium at
a non-standard path that Lighthouse's chrome-launcher cannot find —
the job failed at the healthcheck with 'Chrome installation not
found'.

Switch perf to node:24-bookworm and apt-install Debian's chromium
(/usr/bin/chromium), pointing CHROME_PATH at it. Preferred over
wiring CHROME_PATH to Playwright's bundled Chromium because the
latter couples the job to an exact @playwright/test-version vs
image-tag match that a Renovate bump would silently break.

The future ADR-0016 axe-core e2e job will use the Playwright image;
Lighthouse and Playwright want different things, so they get
different images rather than one that serves both poorly.
This commit is contained in:
Julien Gautier
2026-05-28 10:03:56 +02:00
parent c24795f1d6
commit 441b9297ce
+15 -5
View File
@@ -105,11 +105,21 @@ commits:
perf: perf:
extends: .node-job extends: .node-job
stage: perf stage: perf
# Lighthouse CI drives a real Chrome instance. Playwright's image is # Lighthouse CI drives a real Chrome via chrome-launcher, which
# the canonical "Node + browsers" CI image and is already on our # probes the PATH / CHROME_PATH for a standard Chrome/Chromium
# roadmap for the ADR-0016 axe-core e2e — single image covers both # binary. The Playwright image bundles Chromium under /ms-playwright
# uses once the a11y suite lands. # with a non-standard name chrome-launcher cannot discover, so we
image: mcr.microsoft.com/playwright:v1.55.0-jammy # stay on the base Node image and apt-install Debian's `chromium`
# (lands at /usr/bin/chromium). The future ADR-0016 axe-core e2e job
# — which drives Playwright directly — will use the Playwright image
# instead: the two tools want different things, so they get
# different images rather than one image that serves both poorly.
image: node:24-bookworm
variables:
CHROME_PATH: /usr/bin/chromium
before_script:
- !reference [.node-job, before_script]
- apt-get update -qq && apt-get install -y -qq --no-install-recommends chromium
# Skip on Renovate MRs (same rationale as commits + the perf signal # Skip on Renovate MRs (same rationale as commits + the perf signal
# on a dep bump is essentially zero). Push events on `main` still # on a dep bump is essentially zero). Push events on `main` still
# run perf — we catch regressions immediately post-merge, not # run perf — we catch regressions immediately post-merge, not