Skip to main content
The smallest useful CI setup: a handful of tests labeled critical run on every pull request, and one failure blocks the merge. This recipe keeps the gate fast (minutes, not a full suite) and strict (a real failure stops the merge).

The tests

Label the flows whose failure means “do not ship”:
tests/critical/checkout.test.yaml
Keep the critical label under roughly ten tests. Every test in the gate is a flow you would roll back for: sign-in, checkout, the primary write action. Edge cases belong in the nightly suite, not the gate.

The workflow

The job installs momentic from devDependencies, so your lockfile pins the CLI version. Add it once with npm install -D momentic.
.github/workflows/critical-path.yml
  • --labels critical runs only labeled tests. --upload-results attaches the run group to the dashboard so a failure links to video and traces from the PR check.
  • -y skips confirmation prompts in CI.

Make it required

In GitHub, add the job’s check name (Critical flows / test) to the branch protection’s required status checks. Until then the gate is advisory.

Flake policy for a gate

A gate that flakes trains people to click “re-run” instead of reading the failure. Two controls:
  • Quarantine. A quarantined test still runs but does not fail the check by default. Use --skip-quarantined to drop them from the gate entirely, or --ignore-quarantine for maximum strictness. See quarantine.
  • Retries. --retries 1 gives a failing test one more run; more than one retry in a gate hides real problems.

Slow gate

Swap --labels critical for AI test selection (--ai-select --ai-select-base origin/main) so the PR only runs the tests that cover its diff. See Common CI setups for the deployment-triggered variant.