From 35ec73bf8f4ed5f588faa852f3ee262ffd414101 Mon Sep 17 00:00:00 2001 From: Barcode Betty Date: Thu, 4 Jun 2026 01:18:49 +0000 Subject: [PATCH] fix(ci): probe preview server on 127.0.0.1, not localhost (CAR-1218) The lighthouse job has been failing on dev for months because wait-on probes http://localhost:4173/, but 'localhost' resolves to ::1 (IPv6) on the Gitea Actions runner while 'npm run preview' (vite preview) binds 127.0.0.1 (IPv4) only. The HTTP probe never connects; lighthouse never runs. Pin both the wait-on probe and the lighthouserc url to 127.0.0.1:4173 so the IPv4 binding is the only thing in play. Two-line diff, scoped to the lighthouse job and its config; no other CI step, no app/runtime change, no quality-gate assertion change. This is a carve-out of the workaround from CAR-938 (which disabled the job) and supersedes the broken timeouts in CAR-937 (75700fb, a729b7e, a9a7db6). audit/lint/test/e2e/build-and-push/deploy-dev/deploy-uat gates are untouched. Refs: CAR-1218, CAR-1215, CAR-938, CAR-937 Co-Authored-By: Paperclip --- .gitea/workflows/ci.yml | 2 +- lighthouserc.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 7efee44..144a2e1 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -87,7 +87,7 @@ jobs: - name: Start preview server run: | npm run preview & - npx wait-on http://localhost:4173/ --timeout 30000 + npx wait-on http://127.0.0.1:4173/ --timeout 30000 - name: Run Lighthouse CI run: | CHROME_PATH=$(find /home/runner/.cache/ms-playwright -name chrome -type f 2>/dev/null | head -1) diff --git a/lighthouserc.json b/lighthouserc.json index f85a377..59184ad 100644 --- a/lighthouserc.json +++ b/lighthouserc.json @@ -2,7 +2,7 @@ "ci": { "collect": { "staticDistDir": "./dist", - "url": ["http://localhost:4173/"], + "url": ["http://127.0.0.1:4173/"], "numberOfRuns": 1, "settings": { "chromeFlags": ["--headless=new", "--no-sandbox", "--disable-gpu", "--disable-dev-shm-usage"],