ci(web): run the production build, use the .nvmrc Node, and test shared-package changes

Merged
KM
5d ago
+24-1

Closes the gaps that let #499's build error reach main (fixed in #510):

  • Production build step (pnpm build:editor && pnpm build:web). Next.js validates route handler signatures and page exports only during next build, so the typecheck and tests passed while Railway's build failed.
  • Node from .nvmrc (24.22.3) instead of 22, the same as Railway's Railpack build.
  • Wider path filters: packages/**, the lockfile, root package/workspace/turbo config, .nvmrc and this workflow now trigger the job. Before, only apps/web/** did, so e.g. #505's lockfile change never ran web tests.

Ask Polylane for an impact assessment of this pull request:

Assess with Polylane


Summary by cubic

Updates the web CI workflow so it catches the same build failures that break production.

  • Runs a production build (pnpm build:editor && pnpm build:web) after typechecking, since Next.js only validates route handlers and page exports during next build.
  • Uses the Node version from .nvmrc (24.22.3) instead of 22, matching Railway.
  • Triggers the job on changes to packages/**, the lockfile, root config files, .nvmrc, and this workflow, not just apps/web/**.

Summary by CodeRabbit

  • Tests
    • Pull request and main branch checks now run for changes to the web app, shared packages, root manifests and configuration, .nvmrc, and the workflow.
    • Test runs use the Node version specified by the project.
    • Production builds of the editor and web apps now run after type checking, with cloud mode enabled and environment validation skipped.