diff --git a/.github/workflows/ci-pr.yml b/.github/workflows/ci-pr.yml index 9a00b6b4..e3bdaf49 100644 --- a/.github/workflows/ci-pr.yml +++ b/.github/workflows/ci-pr.yml @@ -261,6 +261,14 @@ jobs: if: steps.scope.outputs.mode != 'none' run: pnpm db:seed:minimal + # CI e2e runs against the production build (see playwright.config.ts + # webServer.command); the dist dir must match the webServer env. + - name: Build for e2e + if: steps.scope.outputs.mode != 'none' + run: pnpm build + env: + NEXT_DIST_DIR: .next/e2e + - name: E2E tests (full suite) if: steps.scope.outputs.mode == 'full' run: pnpm test:e2e diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9a041c6a..2510cb79 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -132,5 +132,10 @@ jobs: - run: pnpm migrate - run: pnpm db:seed:minimal + - name: Build for e2e + run: pnpm build + env: + NEXT_DIST_DIR: .next/e2e + - name: E2E tests (full suite) run: pnpm test:e2e diff --git a/playwright.config.ts b/playwright.config.ts index a9efe28d..38559d44 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -90,7 +90,14 @@ export default defineConfig({ }, ], webServer: { - command: 'pnpm dev', + /* + * CI serves the PRODUCTION build (`pnpm start` after a `pnpm build` step in + * the e2e job): dev-mode cold webpack compiles per route plus dev-server + * memory restarts made the full suite blow the 30-min job timeout on CI + * (measured 2026-07-30 — first full e2e run on the parallel pipeline). + * Locally `pnpm dev` stays: no build wait and hot reload while writing specs. + */ + command: process.env.CI ? 'pnpm start' : 'pnpm dev', /* * Never reuse a dev server a developer may already have running against the * production database — always start a fresh one bound to the test DB.