Skip to content

Run the real-browser CI checks as three parallel jobs - #1923

Merged
davidmckayv merged 1 commit into
mainfrom
ci/browser-job-fast
Nov 20, 2026
Merged

davidmckayv merged 1 commit into
mainfrom
ci/browser-job-fast

Conversation

@davidmckayv

Copy link
Copy Markdown
Contributor

app (real browser) was the longest job of a full CI run: 11 to 20 minutes, while the shards finish in about 4. It ran the Chromium list, the WebKit dictation test and the desktop setup window one after another. This splits it into three jobs that run side by side.

What changed

  • app (real browser): the same Chromium list, run with bun test --parallel (one worker process per core, each file in its own browser). The list took 414s serially in CI. Locally, 8 workers ran all 313 tests in 117s.
  • app (real browser, WebKit): the dictation test, with the same env (OPENBOT_APP_BROWSER=1, OPENBOT_APP_ENGINES=chromium,webkit). It runs inside Playwright's own image for the pinned playwright-core (mcr.microsoft.com/playwright:v1.62.1-noble, pinned by digest), which already has both browsers and every system package they need. The checkout, its installs and Bun come from the runner, so it is the same Bun as every other job. A new test in scripts/ci-changes.test.ts fails if the image tag stops matching the root's playwright-core.
  • app (real browser, desktop setup window): desktop/src/setupLayout.browser.test.ts in its own job, as before.
  • scripts/ci-changes.ts: the app_browser rule now waits on all three check names. verify needs all three.

Why the WebKit image, and no browser cache

  • The slow step was never the browsers. They download from Playwright's CDN in about 4 seconds. The slow step was WebKit's system packages, about 94 MB from the Ubuntu apt mirror: 34s on run 44677492245, but 8m51s at 178 kB/s on run 44666990784.
  • Playwright's CI docs advise against caching the browser binaries, because restoring them takes about as long as downloading them, and because the OS packages cannot be cached. For Linux they recommend their Docker image instead: https://playwright.dev/docs/ci#caching-browsers
  • Chromium's packages are small (about 20s on a normal day), so the Chromium and desktop jobs still install on the runner. That also keeps their layout tests on the runner's own fonts.

Before

run app (real browser) whole run
44677492245 (main) 11m13s 12m05s
44666990784 20m18s (WebKit packages 8m51s)
44665869218 (main) 13m37s

Steps on 44677492245: Chromium list 6m54s, WebKit install 34s, dictation 12s, desktop setup window 3m02s.

After

Measured on this PR's run and on main's run after the merge.

app (real browser) ran the Chromium list, the WebKit dictation test and the
desktop setup window one after another: 11 to 20 minutes, the longest job of
a run. Now:

- app (real browser): the Chromium list with bun test --parallel, a worker
  process per core.
- app (real browser, WebKit): the dictation test in Playwright's own image
  for the pinned playwright-core, pinned by digest, so WebKit's system
  packages no longer come from the Ubuntu mirror (94 MB, which took nine
  minutes on a slow day). A test holds the image tag to playwright-core.
- app (real browser, desktop setup window): its own job.

The app_browser rule waits on all three, and verify needs them.
@davidmckayv
davidmckayv merged commit caa719b into main Nov 20, 2026
4 checks passed
@davidmckayv
davidmckayv deleted the ci/browser-job-fast branch November 20, 2026 05:55
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.

1 participant