ci: test on every push, gate Vercel production deploy on tests#2
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
GitHub Actions runs lint, type-check, Vitest, and Playwright E2E on every push and PR. A deploy job runs only on main after tests pass (vercel build/deploy --prebuilt --prod). vercel.json disables Vercel's auto-deploy for main only, so PR/branch previews keep working while production flows exclusively through the tested CI gate.
- .nvmrc 22.4.0 -> 24; engines.node >=22.12.0 (several deps require >=22.12) - npm update within semver ranges: Next 15.5.19, React/React-DOM 19.2.7, Zod 4.4.3, Prettier 3.8.3, TypeScript 5.9.3, @tabler/icons 3.44, etc. - Node 24 ships npm 11, which fixes the optional-dependency bug (#4828) that blocked Rolldown's native binary on CI under the old npm 10. Verified: tsc, lint, 239 tests, production build, and E2E all green. Deferred to a follow-up: Next 16, Tailwind 4, TypeScript 6, ESLint 10, nodemailer 8.
CI now runs Playwright against 'next build && next start' instead of 'next dev', eliminating on-demand-compile/hydration flake (the contact 'Sending…' pending-state assertion). The contact test also holds its mocked server-action request open until assertions finish rather than racing a fixed timeout.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a GitHub Actions pipeline and routes production through it.
CI (
.github/workflows/ci.yml)npm ci→ lint →tsc --noEmit→ Vitest (239) → Playwright E2E (13).deployjob runs only onmainafter tests pass:vercel build --prod→vercel deploy --prebuilt --prod.vercel.jsonmainonly; PR/branch preview deploys still work.Required before merge — add GitHub repo secrets:
VERCEL_TOKEN,VERCEL_ORG_ID,VERCEL_PROJECT_ID(org/project IDs from.vercel/project.jsonaftervercel link). Until then the production deploy job will fail.