forked from cartsnitch/cartsnitch
fix(ci): bind vite preview to 127.0.0.1, not localhost (CAR-1218)
The act runner resolves 'localhost' to ::1 (IPv6) and the preview server does not get a reachable IPv4 socket, so wait-on times out and the 'Start preview server' step fails the lighthouse job. Bind explicitly to 127.0.0.1 (IPv4). Refs CAR-1218, CAR-1302, CAR-1334
This commit is contained in:
@@ -91,6 +91,9 @@ jobs:
|
|||||||
npm install -g playwright
|
npm install -g playwright
|
||||||
npx playwright install --with-deps chromium
|
npx playwright install --with-deps chromium
|
||||||
- name: Start preview server
|
- name: Start preview server
|
||||||
|
# CAR-1218: bind to 127.0.0.1 (IPv4) not localhost. The act runner
|
||||||
|
# resolves 'localhost' to ::1 (IPv6) and the preview server does not
|
||||||
|
# get a reachable IPv4 socket, so wait-on times out.
|
||||||
run: |
|
run: |
|
||||||
npx vite preview --host 127.0.0.1 --port 4173 &
|
npx vite preview --host 127.0.0.1 --port 4173 &
|
||||||
npx wait-on http://127.0.0.1:4173/ --timeout 30000
|
npx wait-on http://127.0.0.1:4173/ --timeout 30000
|
||||||
|
|||||||
Reference in New Issue
Block a user