forked from cartsnitch/cartsnitch
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 <noreply@paperclip.ing>
This commit is contained in:
@@ -87,7 +87,7 @@ jobs:
|
|||||||
- name: Start preview server
|
- name: Start preview server
|
||||||
run: |
|
run: |
|
||||||
npm run preview &
|
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
|
- name: Run Lighthouse CI
|
||||||
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)
|
||||||
|
|||||||
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
"ci": {
|
"ci": {
|
||||||
"collect": {
|
"collect": {
|
||||||
"staticDistDir": "./dist",
|
"staticDistDir": "./dist",
|
||||||
"url": ["http://localhost:4173/"],
|
"url": ["http://127.0.0.1:4173/"],
|
||||||
"numberOfRuns": 1,
|
"numberOfRuns": 1,
|
||||||
"settings": {
|
"settings": {
|
||||||
"chromeFlags": ["--headless=new", "--no-sandbox", "--disable-gpu", "--disable-dev-shm-usage"],
|
"chromeFlags": ["--headless=new", "--no-sandbox", "--disable-gpu", "--disable-dev-shm-usage"],
|
||||||
|
|||||||
Reference in New Issue
Block a user