forked from cartsnitch/cartsnitch
fix(ci): bind vite preview to 127.0.0.1, not localhost (CAR-1218)
The previous fix (probe 127.0.0.1) wasn't enough because 'vite preview' binds to 'localhost', which resolves to ::1 (IPv6) on the Gitea Actions runner. wait-on probed 127.0.0.1 but vite preview was listening on ::1, so the IPv4 probe still timed out. Use 'npx vite preview --host 127.0.0.1 --port 4173' to force the explicit IPv4 binding, matching the wait-on probe. Two-line diff total with the lighthouserc.json change. The vite preview 'Local' message will report 127.0.0.1:4173 (no 'Network' line because we're not bound to 0.0.0.0). Refs: CAR-1218 Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
@@ -86,7 +86,7 @@ jobs:
|
||||
npx playwright install --with-deps chromium
|
||||
- name: Start preview server
|
||||
run: |
|
||||
npm run preview &
|
||||
npx vite preview --host 127.0.0.1 --port 4173 &
|
||||
npx wait-on http://127.0.0.1:4173/ --timeout 30000
|
||||
- name: Run Lighthouse CI
|
||||
run: |
|
||||
|
||||
Reference in New Issue
Block a user