forked from cartsnitch/cartsnitch
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:
@@ -71,10 +71,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
|
||||
|
||||
Reference in New Issue
Block a user