ci: run the benchmark suites only when a change can reach them
Merged
OK
2mo ago+154+154+012345678901234567890123456789-29-29-01234567890123456789
What and why
benchmark.ymlandmobile.ymlran all six suites (two Linux jobs for the web benchmark, two Mac jobs with two simulators each and two emulator jobs for the mobile one) on every pull request, docs, testbed, and runner-test-only changes included. Most pull requests here are one of those.- A
changesjob in each workflow runs dorny/paths-filter over.github/filters.yml. The suites are skipped unless the change reaches the runner, that benchmark's engine, or the benchmark app. One filter file, so the shared runner list is written once. - The six suites are the
Mainruleset's required checks. A workflow-levelpaths:filter would leave them pending and block the merge; a job skipped byif:reports success. That is why the gate is a job, and why the comments and AGENTS.md say never to switch those workflows topaths:. - The gate fails toward running. A
workflow_dispatchruns the suites, and so does a run whosechangesjob failed (!cancelled() && (needs.changes.result != 'success' || ...)). A fork's pull request keeps its existing rule for the agentic suites. - The mobile suites are four named jobs sharing their steps through YAML anchors instead of a matrix. A matrix job skipped at the job level reports as
ios ${{ matrix.suite }}, unexpanded (seen on the probe PR #528), so the required checksios deterministicandios agenticwould never arrive. - A push to
mainis filtered the same way, diffed against the commit before the push. The Expo build cache is keyed by native fingerprint, so a merge that skips mobile leaves it as it was.
flowchart LR
A[pull_request / push to main] --> B[changes: paths-filter]
B -- runner, engine, or app changed --> C[web, web agent]
B -- runner, engine, or app changed --> D[ios x2, android x2]
B -- nothing reached them --> E[skipped: required checks satisfied]
F[workflow_dispatch] --> C
F --> D
What reaches which suite (.github/filters.yml):
| change | web | mobile |
|---|---|---|
packages/e2e/src/**, root package.json, pnpm-lock.yaml, pnpm-workspace.yaml, tsconfig.base.json, scripts/**, the filter file | yes | yes |
packages/web/**, packages/github/**, apps/web-benchmark/**, benchmark.yml | yes | no |
packages/mobile/**, apps/mobile-benchmark/**, mobile.yml, .github/actions/expo-app/** | no | yes |
packages/*/tests/**, any *.md, docs/**, apps/testbed/**, skills/**, .changeset/**, spec.yml | no | no |
Seen on GitHub, not just in a local matcher:
| path | run | result |
|---|---|---|
| docs-only pull request (#528, a trailing newline in README.md) | mobile, benchmark | changes green, all six suites skipped under their required-check names |
| this pull request (workflows and the filter changed) | its own checks | every suite runs |
workflow_dispatch on this branch | benchmark | filter step skipped, both suites ran and passed |
ios agentic is red here on the Stripe PaymentSheet scenario (LOCATOR_NOT_FOUND on the sheet's label, 23 of 24 pass), exactly as on the last three main runs before this branch. Not from this change.
Checklist
- Changeset added (
pnpm changeset) for any change to a published package, or the change is testbed, docs, or CI only. - Breaking change: title carries
!, the changeset body names what breaks and what replaces it, and the deprecation warning landed a window earlier (stability policy in CONTRIBUTING.md). - Docs updated in the same PR: the
docs/**/*.mdxpage for the behavior, andskills/e2e/if the skill describes it. (Repo CI lives in AGENTS.md, not on the docs site.) - Contract change: emitted
.d.tsreviewed,tests/types/sdk-types.tsupdated; wire change edits the schema and both fixtures. - Engine contract change (
e2e/engine): changesets fore2e,@e2edev/web, and@e2edev/mobile.