Skip to content
This repository was archived by the owner on May 6, 2026. It is now read-only.

perf: speed up Playwright CI#894

Merged
aalemayhu merged 9 commits into
mainfrom
perf/playwright-speedup
May 5, 2026
Merged

perf: speed up Playwright CI#894
aalemayhu merged 9 commits into
mainfrom
perf/playwright-speedup

Conversation

@aalemayhu
Copy link
Copy Markdown
Contributor

Summary

  • Chromium only — drops Firefox and WebKit from CI; both are rarely where web app bugs surface, and this alone cuts browser sessions from 57 → 19
  • workers: '50%' instead of workers: 1 — tests run in parallel, using half the available CPU cores
  • retries: 1 instead of 2 — one retry is enough; third attempt almost never recovers something the second didn't
  • Browser cache keyed on pnpm-lock.yaml — skips the ~30s playwright install on repeat runs
  • chromium only install--with-deps chromium instead of all three browsers
  • pnpm run preview instead of npm run preview
  • timeout-minutes: 15 instead of 60

Expected impact

Before After
57 browser sessions (3 browsers × 19 tests) 19 sessions (1 browser)
Serial execution (workers=1) Parallel (~50% cores)
Browser downloaded every run Cached across runs
Up to 3× each test on failure Up to 2×

🤖 Generated with Claude Code

@netlify
Copy link
Copy Markdown

netlify Bot commented May 5, 2026

Deploy Preview for 2anki-web ready!

Name Link
🔨 Latest commit ebe279f
🔍 Latest deploy log https://app.netlify.com/projects/2anki-web/deploys/69fa5b4edf970c00081357b6
😎 Deploy Preview https://deploy-preview-894--2anki-web.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

aalemayhu and others added 2 commits May 5, 2026 22:50
- Chromium only (drop Firefox + WebKit) — 3× fewer browser sessions
- workers: '50%' instead of 1 — fully parallel on CI runners
- retries: 1 instead of 2 — one safety net is enough
- Cache ~/.cache/ms-playwright keyed on lockfile — skip browser download on repeat runs
- Install only chromium binary/deps (--with-deps chromium) — faster install
- pnpm run preview instead of npm run preview

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@aalemayhu aalemayhu force-pushed the perf/playwright-speedup branch from 1e66a3b to 1762ce0 Compare May 5, 2026 20:50
aalemayhu and others added 7 commits May 5, 2026 22:52
Adds cache: pnpm to actions/setup-node in build, lint, and test
workflows. On cache hit pnpm install resolves from disk instead of
the network — typically saves 20-40s per job.

Also removes the single-item strategy matrix from each (pointless
overhead for a single Node version).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
ubuntu-latest already has all Chromium runtime deps. The only
packages install-deps adds are obscure font packs (21 MB) that
functional UI tests don't need.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Both build and playwright workflows now share a dist cache keyed on
a hash of all source files and config. On a cache hit the build step
is skipped entirely — playwright no longer rebuilds what build.yml
already compiled.

Also fix pnpm/action-setup order and add cache: pnpm to playwright
workflow so node_modules are also cached there.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Cache node_modules keyed on pnpm-lock.yaml in all four workflows.
On a hit, pnpm install is skipped entirely (~0s vs ~8s cold / ~2s warm).
The pnpm store cache (cache: pnpm on setup-node) remains as fallback
for when the lockfile changes and node_modules must be rebuilt.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 5, 2026

@aalemayhu aalemayhu merged commit ed7356b into main May 5, 2026
11 checks passed
@aalemayhu aalemayhu deleted the perf/playwright-speedup branch May 5, 2026 21:05
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant