From 4e772d120a702ddfd4c14c95cabe8113142e9d6b Mon Sep 17 00:00:00 2001 From: Barcode Betty Date: Thu, 4 Jun 2026 01:21:59 +0000 Subject: [PATCH] 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 --- .gitea/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 144a2e1..6dfc8c3 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -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: |