The tests
tests/smoke/signup.test.yaml
url: --url-override points them at whichever
deployment fired the event.
The workflow
The job installsmomentic from devDependencies, so your lockfile pins the
CLI version. Add it once with npm install -D momentic.
.github/workflows/preview-smoke.yml
deployment_statusfires for Vercel and any provider that posts a GitHub deployment.environment_urlis the preview URL. For providers that do not post deployments, poll for the URL first: see the Next.js on Vercel guide for the wait-for-preview variant.deployment.environment == 'Preview'restricts this job to previews. Match the environment names your provider posts (Vercel usesPreviewandProduction).--url-overridereplaces each test’surland each environment’sbaseUrl.- Drop the
--custom-headerspair when the preview is public. For protection-bypass details, see Vercel preview auth.
Decisions
--labels smokeis a fixed list;--ai-selectpicks tests from the diff. Use the label for a fast universal gate, selection when the suite is large, or both.- A smoke test is an end-to-end happy path that finishes in minutes. If the preview job takes longer than a reviewer waits, it is doing regression work. Move those tests to the nightly suite.
- Make the check required in branch protection to block a merge when the preview test fails. It does not roll the deployment back. For post-deploy rollback gating, see the deploy-gate workflow in Common CI setups.