Skip to content

ci(tests): cache the Playwright browsers and cap the e2e job - #2743

Merged
Hugo0 merged 1 commit into
mainfrom
ci/cache-playwright-browsers
Aug 18, 2026
Merged

ci(tests): cache the Playwright browsers and cap the e2e job#2743
Hugo0 merged 1 commit into
mainfrom
ci/cache-playwright-browsers

Conversation

@Hugo0

@Hugo0 Hugo0 commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Summary

Install Playwright browsers hung three times on 2026-08-18, ~30 minutes each, while sibling runs cleared the same step in under two minutes. It's an unguarded network download with no cache and no timeout, and the job inherits the 6h default.

Why this is more than a nuisance: an unbounded hang means ci-success never reports. content-publish-automerge merges on all-green-of-N ci-success runs, and a bot-pushed bump branch has exactly one — so N stays 0 and a content publish stalls with no error anywhere. Bounding the job converts a silent stall into a visible red run.

Changes

  • timeout-minutes: 20 on the e2e job, plus 6 minutes on each install step. First timeout-minutes in this workflow.
  • Cache ~/.cache/ms-playwright, keyed on the resolved @playwright/test version, so most runs skip the download entirely.
  • On a cache hit, run playwright install-deps only — the cache holds browser binaries, not the apt packages they link against.

Risk

Low, CI-only. Worst case is a cache miss, which is exactly today's behaviour. The one behaviour change to know about: a genuinely slow e2e run now fails at 20 minutes instead of hanging — intended, and well above the ~2 minute norm.

Found while auditing unverified commits (TASK-21002) — unrelated to signing, but it threatens the same pipeline.

Screenshots: N/A (CI only).

Summary by CodeRabbit

  • Chores
    • Improved end-to-end test reliability by adding execution time limits.
    • Added browser caching to reduce setup time for repeated test runs.
    • Separated browser and system dependency installation with dedicated time limits.

"Install Playwright browsers" hung three times on 2026-08-18, ~30 minutes
each, while sibling runs cleared the same step in under two minutes. It is an
unguarded network download with no cache and no timeout, and the job inherits
the 6h default.

An unbounded hang is worse than a failure here. `ci-success` never reports
while the job sits there, and content-publish-automerge merges on
all-green-of-N `ci-success` runs — a bot-pushed bump branch has exactly one,
so N stays 0 and the publish stalls with no error anywhere. Bounding the job
turns a silent stall into a red run someone can see.

Cache the browser binaries keyed on the Playwright version so most runs skip
the download entirely, and install only the apt deps on a cache hit, since
the cache holds browsers rather than system packages.
@vercel

vercel Bot commented Aug 18, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
peanut-wallet Ready Ready Preview Aug 18, 2026 6:05pm

Request Review

@Hugo0
Hugo0 deployed to content-publish August 18, 2026 17:59 — with GitHub Actions Active
@coderabbitai

coderabbitai Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: ef59a7e8-541a-4794-ad6a-313214a17c3f

📥 Commits

Reviewing files that changed from the base of the PR and between 935a0b3 and b3572df.

📒 Files selected for processing (1)
  • .github/workflows/tests.yml

Included review availability: 3 reviews are currently available. Based on recent review activity, included reviews refill at 5 per hour.


📝 Walkthrough

Walkthrough

The E2E workflow now limits job duration, caches Playwright browsers by OS and version, and applies separate conditional installation steps with six-minute timeouts.

Changes

E2E workflow controls

Layer / File(s) Summary
Playwright setup and job timeout
.github/workflows/tests.yml
The E2E job has a 20-minute timeout. Playwright browser caching uses the operating system and Playwright version. Browser installation runs on cache misses, while system dependencies install on cache hits. Each installation step has a six-minute timeout.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to b3572

This localized CI change adds browser caching and bounded job timeouts; no actionable merge-blocking risk remains beyond normal checks and review.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the two main changes: caching Playwright browsers and adding an E2E job timeout.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ci/cache-playwright-browsers

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown
Contributor

Code-analysis diff

Painscore total: 7165.5 → 7165.5 (0)
Findings: 0 net (+0 new, -0 resolved)

@github-actions

Copy link
Copy Markdown
Contributor

🧪 UI test report — ✅ all green

Suites

  • unit: 3172 ran, 0 failed, 0 skipped, 52.7s

📊 Coverage (unit)

metric %
statements 67.4%
branches 52.3%
functions 57.9%
lines 68.2%
⏱ 10 slowest test cases
time test
3.6s src/components/Card/share-asset/__tests__/shareAssetLayout.test.ts › never places two stickers in heavy overlap (broad seed sweep)
1.0s src/utils/__tests__/demo-api.test.ts › isDemoMode() is false when not running under Capacitor
0.4s src/utils/__tests__/auth-token.test.ts › authReady does not park — hydrates the plain token without an unlock
0.3s src/utils/__tests__/sentry.utils.test.ts › defaults to the client budget under a browser global
0.3s src/app/(mobile-ui)/withdraw/__tests__/withdraw-states.test.tsx › Bank withdrawal keeps the $1 minimum for sub-$1 amounts
0.3s src/hooks/__tests__/useCrispTokenId.test.ts › retries then stays undefined when the endpoint keeps failing (no fallback token)
0.3s src/utils/__tests__/sentry.utils.test.ts › still lets a per-call timeoutMs win over the default
0.3s src/app/actions/__tests__/api-headers.test.ts › should include Content-Type in validateInviteCode
0.3s src/components/Card/share-asset/__tests__/shareAssetLayout.test.ts › every sticker stays within canvas at any count
0.3s src/utils/__tests__/auth-token.test.ts › ignores the guarded marker and falls back to the plain token
📍 Inline annotations are in the **Unit test report** check above. Coverage artifact: `coverage-unit`. Generated by `.github/workflows/tests.yml`.

@Hugo0
Hugo0 merged commit 5ae08ae into main Aug 18, 2026
31 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