Skip to content

Conversation

@ammar-agent
Copy link
Collaborator

@ammar-agent ammar-agent commented Nov 25, 2025

Summary

Optimizes Playwright installation in CI by caching browser binaries and installing only chromium.

Changes

New .github/actions/setup-playwright composite action

  • Caches ~/.cache/ms-playwright keyed by Playwright version from bun.lock
  • On cache hit: skips browser download, only runs install-deps
  • Installs only chromium (sufficient for E2E and Storybook, ~3x smaller than all browsers)

Updated CI jobs

  • storybook-test: uses new composite action (was: playwright install --with-deps)
  • e2e-test: uses new composite action (replaces 3 separate steps)

Expected Impact

Scenario Before After
Cache hit Download all browsers Skip download (save ~90s)
Cache miss Download all browsers Download chromium only

The cache hit path is the common case after the first run per Playwright version.


Generated with mux

@ammar-agent ammar-agent force-pushed the playwright-install-ci-optimization branch 2 times, most recently from 60f16fc to 0f0f3b0 Compare November 25, 2025 01:13
Addresses slow CI caused by Playwright browser installation.

## Changes

### New setup-playwright composite action
- Caches ~/.cache/ms-playwright keyed by Playwright version
- On cache hit: skips browser download, only runs install-deps
- Installs only chromium (sufficient for E2E and Storybook, ~3x smaller)

### Updated jobs
- storybook-test: uses new composite action
- e2e-test: uses new composite action (replaces 3 separate steps)

## Expected Impact

| Scenario | Before | After |
|----------|--------|-------|
| Cache hit | Download all browsers | Skip download (save ~90s) |
| Cache miss | Download all browsers | Download chromium only |

_Generated with `mux`_
@ammar-agent ammar-agent force-pushed the playwright-install-ci-optimization branch from 0f0f3b0 to 71db49b Compare November 25, 2025 01:17
@ammario ammario merged commit f1ce064 into main Nov 25, 2025
13 checks passed
@ammario ammario deleted the playwright-install-ci-optimization branch November 25, 2025 01:26
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.

2 participants