fix(e2e): disable reuseExistingServer in CI to guarantee test-mode env (v1.0.8 C3)

Prep for the upcoming E2E Playwright CI workflow (Batch C). When the
config flips reuseExistingServer to false in CI, each runner spawns a
dedicated backend + Vite dev server with the test-mode env vars
(APP_ENV=test, DISABLE_RATE_LIMIT_FOR_TESTS=true, etc.) instead of
piggy-backing on whatever happened to be listening on 18080/5173.

Local dev keeps reuseExistingServer=true so engineers retain the fast
turnaround when the dev stack is already up via `make dev`.

CI flag follows the standard convention (process.env.CI is set by
GitHub / Forgejo Actions automatically). No behaviour change for the
default `npm run e2e` invocation.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
senke 2026-04-25 23:27:30 +02:00
parent c488a4b8d6
commit 46d21c5cdd

View file

@ -138,7 +138,7 @@ export default defineConfig({
command: 'go run cmd/api/main.go',
cwd: '../../veza-backend-api',
port: 18080,
reuseExistingServer: true,
reuseExistingServer: !process.env.CI,
timeout: 30_000,
env: {
APP_ENV: 'test',
@ -152,7 +152,7 @@ export default defineConfig({
command: 'npm run dev -- --host 127.0.0.1',
cwd: '../../apps/web',
port: parseInt(process.env.PORT || '5173', 10),
reuseExistingServer: true,
reuseExistingServer: !process.env.CI,
timeout: 30_000,
},
],