ci: run the benchmark suites only when a change can reach them

Merged
OK
2mo ago
+154-29

What and why

  • benchmark.yml and mobile.yml ran 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 changes job 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 Main ruleset's required checks. A workflow-level paths: filter would leave them pending and block the merge; a job skipped by if: reports success. That is why the gate is a job, and why the comments and AGENTS.md say never to switch those workflows to paths:.
  • The gate fails toward running. A workflow_dispatch runs the suites, and so does a run whose changes job 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 checks ios deterministic and ios agentic would never arrive.
  • A push to main is 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):

changewebmobile
packages/e2e/src/**, root package.json, pnpm-lock.yaml, pnpm-workspace.yaml, tsconfig.base.json, scripts/**, the filter fileyesyes
packages/web/**, packages/github/**, apps/web-benchmark/**, benchmark.ymlyesno
packages/mobile/**, apps/mobile-benchmark/**, mobile.yml, .github/actions/expo-app/**noyes
packages/*/tests/**, any *.md, docs/**, apps/testbed/**, skills/**, .changeset/**, spec.ymlnono

Seen on GitHub, not just in a local matcher:

pathrunresult
docs-only pull request (#528, a trailing newline in README.md)mobile, benchmarkchanges green, all six suites skipped under their required-check names
this pull request (workflows and the filter changed)its own checksevery suite runs
workflow_dispatch on this branchbenchmarkfilter 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/**/*.mdx page for the behavior, and skills/e2e/ if the skill describes it. (Repo CI lives in AGENTS.md, not on the docs site.)
  • Contract change: emitted .d.ts reviewed, tests/types/sdk-types.ts updated; wire change edits the schema and both fixtures.
  • Engine contract change (e2e/engine): changesets for e2e, @e2edev/web, and @e2edev/mobile.