WEBDEV-8518: Add CI caching and standardize workflow hygiene#55
Merged
Conversation
Enable npm dependency caching via actions/setup-node cache:npm (keyed on package-lock.json) across all four workflows, and cache Playwright browsers (~/.cache/ms-playwright) in the test workflows that run playwright install. Also standardize workflow hygiene: pin Node 24 everywhere (add a setup-node step to gh-pages-main, which had none), switch ci/pr-preview from npm install to npm ci, and bump actions/setup-node (and ci checkout) to v6. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
The test suite only launches chromium (vite.config.ts), but `npx playwright install` was downloading firefox + webkit + ffmpeg too — wasted bandwidth and extra CDN downloads that can hang. Restrict to chromium and add a 5-minute step timeout so a flaky download fails fast instead of hanging the job. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
The chromium download reaches 100% then the install hangs in the finalize/extract phase (the CDN sends the body but the connection never closes, so the install promise never resolves). A plain step timeout just fails the job. Wrap the install in a hard per-attempt `timeout --signal=KILL` with up to 3 retries so a stalled attempt is killed and reattempted on a fresh connection. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Root cause of the CI hang: Node 24.16.0 (which `node-version: 24` now resolves to on the runner) hangs in Playwright's post-download extract step (browser downloads to 100%, then the install never completes). Node 24.15.0 works. Pin the exact patch across all workflows. Drop the retry loop added while diagnosing — the failure was deterministic, not a transient CDN stall, so retries don't help. Keep the chromium-only scope and a 6-minute step timeout as a backstop. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #55 +/- ##
=======================================
Coverage 78.75% 78.75%
=======================================
Files 16 16
Lines 645 645
Branches 168 168
=======================================
Hits 508 508
Misses 95 95
Partials 42 42 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Upgrading playwright 1.56.1 -> 1.60.0 resolves the post-download extract hang on Node 24.16.0, so the exact-patch Node pin is no longer needed. Revert node-version back to 24 across all workflows. Local suite passes on 1.60.0 (144 tests). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
jbuckner
added a commit
that referenced
this pull request
May 28, 2026
* origin/main: (28 commits) WEBDEV-8518: Add CI caching and standardize workflow hygiene (#55) WEBDEV-8464 Make ia-dropdown-search-bar propagate selection changes immediately (#46) WEBDEV-8447 Upgrade ia-dropdown version to address z-index bug (#45) v0.2.5 (#44) WEBDEV-8378 Migrate dropdown-style search bar from Offshoot (#41) 0.2.3 (#43) WEBDEV-8393 Add full OTP form (#42) WEBDEV-8327 Add basic OTP input (#40) Update instructions for adding component stories (#38) Demo page enhancements WEBDEV-8131 Encapsulate property settings (#36) WEBDEV-8167: Add demo and publishing sections to readme (#35) 0.2.2 WEBDEV-8162: Support Lit 2/3, Combobox fixes (#34) 0.2.1 WEBDEV-8151: Improve build compatibility (#32) v0.2.0 (#31) WEBDEV-8119 Add basic combo-box component (#24) Update npm-publish workflow Update npm-publish action ... # Conflicts: # demo/app-root.ts # demo/story-template.ts
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
actions/setup-nodecache: npm(keyed onpackage-lock.json) across all four workflows —ci,npm-publish,gh-pages-main,pr-preview.~/.cache/ms-playwright, keyed on the lockfile hash) in the two test workflows that runplaywright install(ci,npm-publish). This avoids re-downloading chromium (hundreds of MB) on every run.playwright installstill runs so--with-depskeeps installing the OS-level libs not stored in the cache.setup-nodestep togh-pages-main, which previously had none and relied on the runner default), switchci/pr-previewfromnpm install→npm ci, and bumpactions/setup-node(andci'scheckout) to v6.Test plan
pr-previewdeploys the preview successfully with the pinned Node +npm ci.🤖 Generated with Claude Code