fix(lighthouse): set LHCI_CHROME_PATH via runtime discovery

- Re-add Playwright Chromium install (LHCI needs a Chrome binary)
- Use `find` at runtime to locate Playwright's chrome binary:
  CHROME_PATH=$(find /home/runner/.cache/ms-playwright -name chrome ...)
- Pass to LHCI via LHCI_CHROME_PATH env var so LHCI does
  not try (and fail) to auto-download Puppeteer's Chromium

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
Barcode Betty
2026-03-30 19:35:33 +00:00
committed by cartsnitch-ci[bot]
parent 01ea36c5aa
commit 6717e105f4
+6 -1
View File
@@ -57,10 +57,15 @@ jobs:
cache: npm
- run: npm ci
- run: npm run build
- name: Install Chromium for Lighthouse
run: |
npm install -g playwright
npx playwright install chromium
- name: Run Lighthouse CI
run: |
CHROME_PATH=$(find /home/runner/.cache/ms-playwright -name chrome -type f 2>/dev/null | head -1)
npm install -g @lhci/cli
lhci autorun
LHCI_CHROME_PATH="$CHROME_PATH" lhci autorun
build-and-push:
runs-on: runners-cartsnitch