Skip to content

Latest commit

 

History

History
78 lines (60 loc) · 12.1 KB

WORKFLOWS.md

File metadata and controls

78 lines (60 loc) · 12.1 KB

.github/ — CI configuration

This directory holds the GitHub Actions wiring. The contributor-facing guide lives at ../CI.md; the original design is recorded in ../implementations-plan/archive/ci-cd/.

Status check matrix

These status aggregators are what branch protection on main / dev requires. Branch protection matches the produced check-run name, which for a normal GitHub Actions job is its bare name: — there is no Workflow / Status form (that only exists for reusable uses: jobs). A hand-typed context such as Quality / Status never matches a produced check: it hangs the required gate at Expected and forces --admin on every merge. So every aggregator has a unique bare name, and the required contexts name exactly that (see CI.md + ../implementations-plan/archive/required-check-mismatch/). The four e2e lanes decide and aggregate through two shared scripts, scripts/ci-cd/e2e-decide.sh and scripts/ci-cd/e2e-aggregate.sh; each status job checks the second out alone at the run's commit, so a failed fetch reds the required check (CI.md § Concurrency says how to recover).

Workflow Required check-run Required on Runs when What it checks
pr-quick.yml quality-status dev + main every PR to main / dev commitlint, lint, typecheck, units, chrome+firefox build, landing build, Storybook build, launch legal check (PRs into main)
pr-extension-smoke-e2e.yml extension-smoke-e2e-status dev + main e2e:extension-smoke label, OR the extension's build inputs (path-filters/extension-build.yml) or the lane's own smoke-surface paths filter (on dev and main alike) chrome build + puppeteer smoke, 4 shards
pr-extension-network-e2e.yml extension-network-e2e-status dev + main e2e:extension-network label, OR the extension's build inputs or the lane's own extension-network paths filter (on dev and main alike); workflow_dispatch runs the whole lane at retry 0 on any ref full network e2e (anvil + Aztec sandbox + playground), plus two fixed send-chaos seeds
pr-extension-smoke-e2e-firefox.yml extension-smoke-e2e-firefox-status dev + main same gate as the Chrome twin (its own file + setup-geckodriver in the filter), drafts included firefox build + the smoke suite over geckodriver + Puppeteer BiDi, the same 4 shards
pr-extension-network-e2e-firefox.yml extension-network-e2e-firefox-status dev + main same gate as the Chrome twin, drafts included; workflow_dispatch likewise the network suite on Firefox: the same lane as on Chrome (7 proverless shards + 3 heavy jobs + the real-proving canary + the two chaos seeds)
pr-supersede.yml — — a push to an open same-repository PR (synchronize) cancels the PR workflows' runs on heads the PR has moved past; one job with actions: write, no action, no checkout
pr-retarget.yml — — a base change of an open same-repository PR (edited; a title or body edit skips the job) re-runs all jobs of each e2e lane's latest run of the head, cancelling and waiting for a run in flight; one job with actions: write, no action, no checkout
actionlint.yml Status (not required) — when .github/workflows/** or shell scripts change actionlint + shellcheck
release.yml status (not required) — push to main + manual workflow_dispatch release-please + gates + build + smoke against artifact + assets; on a dispatch for a published release, select-assets checks its own assets and the smokes run them instead of a build; publish_chrome / publish_firefox inputs run the store uploads in their protected environments
store-check.yml — — manual workflow_dispatch (store: chrome / firefox / both) proves a store credential read-only (Chrome: one fetchStatus; Firefox: the author-scoped add-on list; no upload)
verify-store-copies.yml — — weekly (Mondays) + manual workflow_dispatch (store: both / chrome / firefox) compares each store's public copy with the release zip it names (digest, SHASUMS256.txt and attestation checked) and fails on any difference beyond the store's own additions
source-rebuild.yml — — weekly (Mondays) + manual workflow_dispatch (tag) rebuilds git archive of a release (or of the commit) on x86_64 + Ubuntu ARM64 with the reviewer script and fails on any byte differing from the shipped Firefox zip
publish-packages.yml — — manual workflow_dispatch (version, dry_run) tests, stages, packs and digest-checks the three @nulo-sh/* npm packages; with dry_run false and the npm-publish environment approved, publishes them with provenance (no npm token) and verifies the provenance the registry serves
publish-token-list.yml — — push to dev changing infra/token-list/list.source.json + manual workflow_dispatch from dev checks the token-list tree and writes the review summary, with an advisory live check of each entry on a public node; with the token-list environment approved, signs the list and opens the chore(token-list): publish sequence <n> PR through the release App
extension-network-e2e-soak.yml Status (not required) — manual workflow_dispatch (test_files, repeats, retry, proverless, disable_presto) the branch-level flake check: the named network files repeats times in sequence at retry 0 on Chrome; GitHub refuses a blank list at dispatch; prep refuses a token that is not a network test file at that commit, and repeats or retry out of range; every named test must pass in every iteration. The whole suite on a branch is a dispatch of the two PR network workflows; nightly.yml builds dev only (CI.md)
nightly.yml status (not required) — schedule (daily) + manual dispatch full quality bar incl. the network suite and send-chaos on Chrome and Firefox, plus two advisory runs, the canary files on the in-browser prover and the rpc failover chaos file at its fixed seed (Chrome) → prerelease GitHub Release from dev (v<ver>-nightly.<YYDDD>), keeping the newest fourteen

Each required check-run is app_id-pinned to GitHub Actions in required_status_checks.checks, so only a check produced by Actions (not a same-named check from another app) can satisfy the gate.

Reusable workflows + composite actions

Reusables live as .github/workflows/_*.yml and are called from top-level workflows. Each is parameterized (ref, etc.) and has at least two callers.

Reusable Callers
_lint-and-typecheck.yml pr-quick, release, nightly
_unit-tests.yml pr-quick, release, nightly: three legs, each a third of the extension's suite (--shard); leg 2 adds test:release, leg 3 the other workspaces and test:ci-gating
_build-extension.yml pr-quick, release, nightly, source-rebuild
_release-pr-lockfile.yml release, release-prerelease
_extension-smoke-e2e.yml pr-extension-smoke-e2e, pr-extension-smoke-e2e-firefox, release, nightly
_extension-network-e2e-lane.yml pr-extension-network-e2e, pr-extension-network-e2e-firefox, nightly (both browsers), release (opt-in: workflow_dispatch with run_network_e2e=true): the network suite's one partition, shard pool + dedicated jobs + chaos seeds, each a call of the suite below
_extension-network-e2e.yml _extension-network-e2e-lane, extension-network-e2e-soak, nightly (its two advisory legs: the in-browser canary and the rpc failover chaos seed)

The two suites and the lane take a browser input (chrome default, firefox); log-artifact and browser-cache names carry the browser so a Firefox lane can neither overwrite nor restore a Chrome lane's.

The extension smokes and the release and nightly publishers download each artifact by its producer's upload id, never by name (_build-extension.yml outputs chrome_artifact_id / firefox_artifact_id; _extension-smoke-e2e.yml takes artifact_id); CI.md § release.yml has why, and scripts/ci-cd/artifact-handoffs.test.ts pins it.

Composite actions live in .github/actions/ and are shared step fragments used inside jobs.

Composite Purpose
setup-bun bun + install cache (cache: "false" skips it and setup-bun's cached binary) + bun install --frozen-lockfile; the caller checks out first
setup-aztec Foundry + Aztec CLI matching the @aztec-labs/aztec.js version, through install.sh: the installer, its versions manifest and the noir and Foundry tarballs are SHA-256-pinned in the action (installer-pins.sha256), and the CLI's npm tree comes from the committed cli/package-lock.json with install scripts off. See SECURITY.md.
setup-puppeteer warm ~/.cache/puppeteer (Chrome); with browser: firefox, install + cache the e2e suite's pinned Firefox (apps/extension/scripts/e2e/install-firefox.ts, apart from Puppeteer's), under a key that shares no prefix with Chrome's
setup-geckodriver download + verify (tarball and extracted-binary SHA-256 pins, single-member archive) + install geckodriver for the Firefox lanes; the pins live in the action. See SECURITY.md.
setup-presto-server download + verify (tarball and extracted-binary SHA-256 pins, single-member archive) + install the headless presto-server binary (Linux x86_64) for CI proving. Used by _extension-network-e2e.yml. See CI.md.

Triggers cheat-sheet

  • Push a commit on a feature branch → no CI runs; local pre-commit hook handles biome + commitlint.
  • Open a PR to dev → pr-quick runs. pr-extension-smoke-e2e and pr-extension-network-e2e run only if their paths filters trip OR their respective label is on the PR.
  • Open a PR to main → pr-quick runs; each e2e lane runs when its filter trips on the promote's whole diff or its label is set, as on dev.
  • Push to an open PR → each workflow starts a run for the new head in its own queue, and pr-supersede.yml cancels the runs still going on older heads of that PR. Another event of the same head (a label, ready_for_review, reopened) or a re-run queues behind that head's run in flight, and replaces any run already waiting (see CI.md).
  • Change an open PR's base → pr-retarget.yml re-runs the four e2e lanes' latest runs of its head, which read the new base (a run in flight is cancelled first); pr-quick is not re-run, and a title or body edit runs nothing (see CI.md).
  • Add e2e:extension-smoke or e2e:extension-network to an open PR → that workflow starts a fresh run (labeled is a subscribed event type; no push needed), after its run in flight for that head, if any, ends; the run decides from the labels the PR carries when it starts, not from its event's snapshot. Removing the label re-evaluates the gate (unlabeled).
  • Click "Run workflow" on release.yml → from the tag, finish publishing that tag's release; from main, submit a published release to the stores (publish_chrome / publish_firefox), which ship its own attested bytes. store-check.yml → check a store credential without uploading.
  • Every night → nightly.yml builds current dev and publishes a prerelease GitHub Release (skips itself when dev HEAD already has tonight's nightly; manual dispatch offers force + dry_run).

Labels

Label Effect
e2e:extension-smoke Force the smoke e2e suite to run on this PR (auto-runs when its paths filters trip).
e2e:extension-network Force the network e2e suite to run on this PR (auto-runs when its paths filters trip).

Branches

Only main (stable) and dev (integration) are long-lived. Feature branches are auto-deleted on merge (gh repo edit --delete-branch-on-merge). See CI.md for the branch model + release flow.