Skip to content

ci(perf): cache Playwright + uv venvs; tighten lint-only scope#530

Merged
blove merged 1 commit into
mainfrom
claude/ci-perf-wins
May 22, 2026
Merged

ci(perf): cache Playwright + uv venvs; tighten lint-only scope#530
blove merged 1 commit into
mainfrom
claude/ci-perf-wins

Conversation

@blove
Copy link
Copy Markdown
Contributor

@blove blove commented May 22, 2026

Summary

Three 🟢 easy wins from the e2e-strategy audit:

  1. Cache Playwright browsers in all 5 jobs that install them. Keyed on lockfile hash. Expected: ~15-30 CI-min saved per libs/chat-touching PR.
  2. Cache per-cap python .venv at all 3 uv sync sites. Keyed on per-cap uv.lock hash. uv sync becomes a no-op on cache hit. Expected: ~10-15 CI-min saved per PR.
  3. Tighten lint-only file scopeeslint.config.mjs moved out of GLOBAL_CI_FILES (which forces full scope) into a new LINT_ONLY_FILES set that flips only the scopes running nx 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 lint — yaml.safe_load clean
  • First PR run: confirm cockpit-e2e + examples-chat-e2e still pass on cache miss
  • Second PR run: confirm cache hits show in job logs (Playwright says "already installed", uv sync is fast)

Audit source: e2e testing strategy audit (in-session research, not committed)

🤖 Generated with Claude Code

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>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 22, 2026

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

Project Deployment Actions Updated (UTC)
threadplane Ready Ready Preview, Comment May 22, 2026 4:56pm

Request Review

@blove blove merged commit e80a260 into main May 22, 2026
45 of 48 checks passed
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