Skip to content

improvement(ci): cache Playwright browsers for e2e jobs - #10226

Closed
waleedlatif1 wants to merge 3 commits into
stagingfrom
ci/playwright-browser-cache
Closed

waleedlatif1 wants to merge 3 commits into
stagingfrom
ci/playwright-browser-cache

Conversation

@waleedlatif1

@waleedlatif1 waleedlatif1 commented Nov 20, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Cached ~/.cache/ms-playwright for the browser e2e groups (HTTP acceptance including SCIM, and mobile). The key is the Playwright version plus the browser set, so a version bump starts a fresh entry and old browser revisions never pile up.
  • Previously every browser job downloaded its browsers on every run, and the suite waited for it after the app was ready: about 45s for Chromium and WebKit shells (markdown-viewer) and about 114s for full Chromium (each of the three browser-extension groups).
  • The SCIM group's People checks launch headless Chromium, so they now install only the headless shell instead of full Chromium plus the shell. One recent run waited 6 minutes on that install after the app was ready.
  • Push validation on staging runs the same checks.yml, so it seeds the cache that PRs restore. PR and fork runs write only to their own scope.
  • install-playwright.sh now reports how long system dependencies and browsers each took, and http-e2e.sh prints that line, so the remaining install cost shows up in every job log.

Type of Change

  • Improvement (CI)

Testing

  • actionlint on checks.yml.
  • Before and after numbers come from this PR's CI run and the next staging push. The timing line in each browser job shows whether the cache hit.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing (new tests pass the test-audit authoring gate)
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercel Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
docs Ready Ready Preview Nov 20, 2026 4:12am UTC

Request Review

@greptile-apps

greptile-apps Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 4/5

[Low impact] The changes affect selected CI browser checks and their install logs.

The PR appears safe to merge, with a non-blocking gap in cache coverage for scim.

Findings

  1. P2 `scim` browsers stay uncached ▶

Summary

Adds Playwright browser caching to HTTP and mobile jobs.

  • Selected browser checks reuse Playwright browsers from a matching cache.
  • Browser install logs show system and browser timings.

Reviews (1) · Last reviewed commit: "improvement(ci): cache Playwright browse..." · Reviewed by Greptile

Comment thread .github/workflows/checks.yml Outdated
- &resolve-playwright
name: Resolve the Playwright version
id: playwright
if: &browser-group contains(fromJSON('["assistant-actions","organization-search","markdown-viewer","workflow-code-ui","mobile"]'), matrix.group) || startsWith(matrix.group, 'browser-extension-')

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 scim browsers stay uncached

The scim job calls start_browser_install people chromium and waits for it, but browser-group skips both new cache steps. It still downloads Chromium on every run. Add scim to the shared condition so this browser job also benefits from the cache.

Suggested change
if: &browser-group contains(fromJSON('["assistant-actions","organization-search","markdown-viewer","workflow-code-ui","mobile"]'), matrix.group) || startsWith(matrix.group, 'browser-extension-')
if: &browser-group contains(fromJSON('["scim","assistant-actions","organization-search","markdown-viewer","workflow-code-ui","mobile"]'), matrix.group) || startsWith(matrix.group, 'browser-extension-')

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

Closing: the first run's timing line shows the browser download is 2-9s per job. The wait comes from Playwright's system-dependency step (apt-get update + install on GitHub-hosted runners, 18-50s and sometimes minutes), and a browser cache can't remove that. After #10225, no browser group is on the PR critical path. Fixing the apt cost means moving these jobs to a runner image with the dependencies preinstalled, which is a runner-cost decision, not a cache change.

@waleedlatif1
waleedlatif1 deleted the ci/playwright-browser-cache branch November 20, 2026 04:17

This branch was successfully deployed

1 active deployment
Preview — 55d9f1bc Deployed Nov 20, 2026 by vercel[bot]
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