mirror of
https://github.com/fsolla/teqo.git
synced 2026-11-13 23:53:05 +00:00
fix(e2e-ci): serve the production build in CI instead of next dev
The first full e2e run on the parallel pipeline hit the 30-min timeout: dev-mode cold webpack compiles per route, a __webpack_modules__ TypeError, and dev-server memory-threshold restarts. CI now builds (NEXT_DIST_DIR matches the webServer env) and playwright webServer runs `pnpm start`; local spec development keeps `pnpm dev`.
This commit is contained in:
parent
2e0cc2c03e
commit
322794b1ee
3 changed files with 21 additions and 1 deletions
8
.github/workflows/ci-pr.yml
vendored
8
.github/workflows/ci-pr.yml
vendored
|
|
@ -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
|
||||
|
|
|
|||
5
.github/workflows/ci.yml
vendored
5
.github/workflows/ci.yml
vendored
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Reference in a new issue