This repository was archived by the owner on May 6, 2026. It is now read-only.
perf: speed up Playwright CI#894
Merged
Merged
Conversation
✅ Deploy Preview for 2anki-web ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
- 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>
1e66a3b to
1762ce0
Compare
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>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
workers: '50%'instead ofworkers: 1— tests run in parallel, using half the available CPU coresretries: 1instead of 2 — one retry is enough; third attempt almost never recovers something the second didn'tpnpm-lock.yaml— skips the ~30splaywright installon repeat runschromiumonly install —--with-deps chromiuminstead of all three browserspnpm run previewinstead ofnpm run previewtimeout-minutes: 15instead of 60Expected impact
🤖 Generated with Claude Code