Skip to content

perf(repo): halve the CI pipeline's run time - #945

Draft
MarquesCoding wants to merge 4 commits into
mainfrom
perf/faster-ci
Draft

MarquesCoding wants to merge 4 commits into
mainfrom
perf/faster-ci

Conversation

@MarquesCoding

Copy link
Copy Markdown
Collaborator

Closes #944.

What this changes

Pipeline

  • Change detection clones history without file contents (filter: blob:none). It needs only the trees to see which files changed. The full clone took 39s of its 49s.
  • No build gate. Test jobs start once the changes are known, restore the newest turbo cache, and build only what changed. The lint and typecheck job builds every package anyway, so it saves this commit's builds for later runs. The separate build job is gone.
  • The smaller packages run on two runners (landing with the quick ones, the rest together), and the phone tests run in two shards. A full run stays within the 20 jobs GitHub runs at once.
  • The metrics image keeps its Docker build cache in the registry, not the Actions cache. Its ~2 GB of layers were crowding out the pnpm stores CI restores every run.

Tests (in later commits on this branch)

  • Typing without per-key pauses
  • Hand-made sleeps replaced with waits on the real event
  • Fake timers advanced asynchronously where tests also await
  • The largest test files split so shards balance

Why

A full run took ~8 minutes (run 47388755876). See #944 for where the time went.

How it was tested

CI on this pull request. Each commit's run is compared against the 8-minute baseline.

…the slow runners

Change detection clones history without file contents. Test jobs no longer wait on a build job:
each restores the newest turbo cache and builds only what changed, and the lint and typecheck job
saves this commit's builds for later runs. The small packages run on two runners and the phone
tests in two shards. The metrics image keeps its build cache in the registry, out of the Actions
cache the CI's dependencies need.

Refs #944
@coderabbitai

coderabbitai Bot commented Dec 5, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

user-event waits a tick between every key by default, and the suites that type the most spent
seconds a test on it: the setup wizard over a second and a half for each. Typing with no delay sends
the same events in the same order.

Refs #944
… on threads, and free two runners

The phone's and the television's tests spend most of their time on Babel compiling React Native,
so a second phone shard compiled it all again. Jest's cache is kept per lockfile instead, and the
phone goes back to one shard. The screens, client and ui suites run on worker threads rather than
a process per file. Each app's native config is generated for both platforms on one runner, which
keeps a full run inside the twenty jobs GitHub runs at once.

Refs #944
…t's pause

Without a pause between events, the release search was clicked before the quality profiles had
loaded, and the people step was asked whether it had finished before its handler had.

Refs #944

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI pipeline takes ~8 minutes; aim to halve it

1 participant