forked from cartsnitch/cartsnitch
fix(ci): lighthouse step-level continue-on-error (CAR-1218)
act_runner does not honor continue-on-error at the job level (the lighthouse job still posts 'failure' commit status). Apply continue-on-error at the step level and capture lhci output to /tmp/lhci.log so we can see the actual lhci failure for future debugging. Refs CAR-1218, CAR-1302, CAR-1334
This commit is contained in:
@@ -89,10 +89,21 @@ jobs:
|
|||||||
npm run preview &
|
npm run preview &
|
||||||
npx wait-on http://localhost:4173/ --timeout 30000
|
npx wait-on http://localhost:4173/ --timeout 30000
|
||||||
- name: Run Lighthouse CI
|
- name: Run Lighthouse CI
|
||||||
|
# CAR-1218: act_runner does not honor continue-on-error at the job level
|
||||||
|
# (job still posts 'failure' status). Apply at the step level so the
|
||||||
|
# commit status reflects success and the PR is unblocked. lhci output
|
||||||
|
# is captured to a file (act_runner suppresses stdout from lhci).
|
||||||
|
continue-on-error: true
|
||||||
run: |
|
run: |
|
||||||
|
{
|
||||||
CHROME_PATH=$(find /home/runner/.cache/ms-playwright -name chrome -type f 2>/dev/null | head -1)
|
CHROME_PATH=$(find /home/runner/.cache/ms-playwright -name chrome -type f 2>/dev/null | head -1)
|
||||||
npm install -g @lhci/cli
|
npm install -g @lhci/cli
|
||||||
CHROME_PATH="$CHROME_PATH" lhci autorun --chrome-flags="--headless=new --no-sandbox --disable-gpu --disable-dev-shm-usage"
|
CHROME_PATH="$CHROME_PATH" lhci autorun --chrome-flags="--headless=new --no-sandbox --disable-gpu --disable-dev-shm-usage"
|
||||||
|
} > /tmp/lhci.log 2>&1 || true
|
||||||
|
echo '=== lhci log (cat /tmp/lhci.log) ==='
|
||||||
|
cat /tmp/lhci.log || echo 'no lhci log produced'
|
||||||
|
echo '=== end lhci log ==='
|
||||||
|
exit 0
|
||||||
|
|
||||||
build-and-push:
|
build-and-push:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|||||||
Reference in New Issue
Block a user