ci(perf): cache Playwright + uv venvs; tighten lint-only scope#530
Merged
Conversation
Three independent CI-cost wins from the e2e-strategy audit: 1. **Cache Playwright browsers** in all 5 jobs that install them (examples-chat-e2e, cockpit-e2e × 24 matrix entries, website-e2e, demo-deploy/website-conditional, production-smoke). Key on the lockfile hash so any @playwright/test bump invalidates the cache. Expected savings: ~30-60s per runner × 28+ runners on a libs/chat PR ≈ ~15-30 CI-minutes. 2. **Cache per-cap python `.venv`** at all 3 uv-sync sites (examples-chat-smoke, examples-chat-e2e, cockpit-e2e × 24). Key on the per-cap uv.lock hash. `uv sync` becomes a no-op when the cache hits. Cache key includes `matrix.cap.python` so the 24 caps don't fight over a single cache entry. 3. **Tighten lint-only file scope**. `eslint.config.mjs` was in GLOBAL_CI_FILES, forcing the full e2e fleet to fire on any lint-config tweak. Moved to a new LINT_ONLY_FILES set that flips only the scopes that actually run `nx lint` (library, cockpit, website, examples_chat) — not the *_e2e/_smoke/_deploy/_secret scopes. Added 2 unit tests covering the new behavior; all 15 ci-scope tests pass. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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
Three 🟢 easy wins from the e2e-strategy audit:
.venvat all 3uv syncsites. Keyed on per-capuv.lockhash.uv syncbecomes a no-op on cache hit. Expected: ~10-15 CI-min saved per PR.eslint.config.mjsmoved out ofGLOBAL_CI_FILES(which forces full scope) into a newLINT_ONLY_FILESset that flips only the scopes runningnx lint. Avoids the ~50 CI-minute spike from a one-line lint-config tweak re-running the 24-cap cockpit-e2e matrix.Combined: ~25-45 CI-minutes saved per typical PR.
Test plan
node --test scripts/ci-scope.spec.mjs— 15/15 passing (2 new tests for lint-only)yaml.safe_loadcleanuv syncis fast)Audit source: e2e testing strategy audit (in-session research, not committed)
🤖 Generated with Claude Code