fix(e2e): keep localhost baseUrl; bind dev server to 0.0.0.0
This commit is contained in:
8
.github/workflows/ci.yml
vendored
8
.github/workflows/ci.yml
vendored
@@ -110,9 +110,9 @@ jobs:
|
|||||||
CLERK_JWKS_URL: ${{ vars.CLERK_JWKS_URL }}
|
CLERK_JWKS_URL: ${{ vars.CLERK_JWKS_URL }}
|
||||||
run: |
|
run: |
|
||||||
cd frontend
|
cd frontend
|
||||||
npm run dev -- --hostname 127.0.0.1 --port 3000 &
|
npm run dev -- --hostname 0.0.0.0 --port 3000 &
|
||||||
for i in {1..60}; do
|
for i in {1..60}; do
|
||||||
if curl -sf http://127.0.0.1:3000/ > /dev/null; then exit 0; fi
|
if curl -sf http://localhost:3000/ > /dev/null; then exit 0; fi
|
||||||
sleep 2
|
sleep 2
|
||||||
done
|
done
|
||||||
echo "Frontend did not start"
|
echo "Frontend did not start"
|
||||||
@@ -121,10 +121,6 @@ jobs:
|
|||||||
- name: Run Cypress E2E
|
- name: Run Cypress E2E
|
||||||
env:
|
env:
|
||||||
NEXT_TELEMETRY_DISABLED: "1"
|
NEXT_TELEMETRY_DISABLED: "1"
|
||||||
# Prefer IPv4 to avoid localhost -> ::1 issues when Next binds only to 127.0.0.1.
|
|
||||||
NODE_OPTIONS: "--dns-result-order=ipv4first"
|
|
||||||
# Force Cypress to use 127.0.0.1 as baseUrl (Cypress only auto-loads CYPRESS_* into Cypress.env()).
|
|
||||||
CYPRESS_baseUrl: "http://127.0.0.1:3000"
|
|
||||||
# Vars for shared Clerk OTP helper (frontend/cypress/support/commands.ts)
|
# Vars for shared Clerk OTP helper (frontend/cypress/support/commands.ts)
|
||||||
CYPRESS_CLERK_ORIGIN: ${{ vars.CYPRESS_CLERK_ORIGIN }}
|
CYPRESS_CLERK_ORIGIN: ${{ vars.CYPRESS_CLERK_ORIGIN }}
|
||||||
CYPRESS_CLERK_TEST_EMAIL: ${{ vars.CYPRESS_CLERK_TEST_EMAIL }}
|
CYPRESS_CLERK_TEST_EMAIL: ${{ vars.CYPRESS_CLERK_TEST_EMAIL }}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { defineConfig } from "cypress";
|
|||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
e2e: {
|
e2e: {
|
||||||
baseUrl: "http://127.0.0.1:3000",
|
baseUrl: "http://localhost:3000",
|
||||||
video: false,
|
video: false,
|
||||||
screenshotOnRunFailure: true,
|
screenshotOnRunFailure: true,
|
||||||
specPattern: "cypress/e2e/**/*.cy.{ts,tsx,js,jsx}",
|
specPattern: "cypress/e2e/**/*.cy.{ts,tsx,js,jsx}",
|
||||||
|
|||||||
Reference in New Issue
Block a user