From 1a39e6dbddb3dce4b3e5406d7b4a679f4c6f4c4f Mon Sep 17 00:00:00 2001 From: KM Koushik Date: Mon, 16 Nov 2026 09:58:11 +1100 Subject: [PATCH] ci(web): run the production build, use the .nvmrc Node, and test changes to shared packages and the lockfile --- .github/workflows/test-web.yml | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-web.yml b/.github/workflows/test-web.yml index aaf0374f7..3ea89f6f0 100644 --- a/.github/workflows/test-web.yml +++ b/.github/workflows/test-web.yml @@ -4,11 +4,25 @@ on: pull_request: paths: - "apps/web/**" + - "packages/**" + - "package.json" + - "pnpm-lock.yaml" + - "pnpm-workspace.yaml" + - "turbo.json" + - ".nvmrc" + - ".github/workflows/test-web.yml" push: branches: - main paths: - "apps/web/**" + - "packages/**" + - "package.json" + - "pnpm-lock.yaml" + - "pnpm-workspace.yaml" + - "turbo.json" + - ".nvmrc" + - ".github/workflows/test-web.yml" jobs: web-tests: @@ -61,7 +75,8 @@ jobs: - name: Setup Node uses: actions/setup-node@v4 with: - node-version: 22 + # Same Node as production (Railway reads .nvmrc too) + node-version-file: .nvmrc cache: pnpm - name: Install dependencies @@ -73,6 +88,14 @@ jobs: - name: Type check run: pnpm --filter=web typecheck + # Next.js checks route handler signatures and page exports only during + # a production build, which the typecheck doesn't cover. + - name: Production build + run: pnpm build:editor && pnpm build:web + env: + SKIP_ENV_VALIDATION: "true" + NEXT_PUBLIC_IS_CLOUD: "true" + - name: Prepare test database schema run: pnpm --filter=web test:integration:prepare