Skip to main content
The nightly job runs the whole suite against staging or production on a schedule. It catches the regressions that PR-scoped checks miss.

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/nightly.yml

Decisions

  • Size --shard-count to keep each shard under ~15 minutes. Hosted browsers (browser.remoteBrowser: true) remove the browser footprint from your runners and raise parallelism; see hosted test environments.
  • --env staging picks the staging entry in momentic.config.yaml; secrets for it live in CI, not the repo. See environments.
  • Merging shard output keeps the dashboard view and triage scoped to the whole night, not four partial views.
  • Running ai triage after the upload lets auto-maintenance repair drifted tests before the next night, and classifications land on the merged run group.
  • Keep the workflow_dispatch trigger; debugging a nightly should not require a fake commit.

Triage failures

Keep nightly failures actionable:
  • Quarantine flakes instead of deleting them; they keep producing data.
  • Give each test an owner: label so the right person reads the failure.
  • Watch the trend, not one night: investigate recurring failures rather than relying on retries.