The workflow
The job installsmomentic from devDependencies, so your lockfile pins the
CLI version. Add it once with npm install -D momentic.
.github/workflows/nightly.yml
Decisions
- Size
--shard-countto 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 stagingpicks thestagingentry inmomentic.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 triageafter the upload lets auto-maintenance repair drifted tests before the next night, and classifications land on the merged run group. - Keep the
workflow_dispatchtrigger; 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.