Skip to content

WEBDEV-8518: Add CI caching and standardize workflow hygiene#55

Merged
jbuckner merged 5 commits into
mainfrom
WEBDEV-8518-ci-caching
May 28, 2026
Merged

WEBDEV-8518: Add CI caching and standardize workflow hygiene#55
jbuckner merged 5 commits into
mainfrom
WEBDEV-8518-ci-caching

Conversation

@jbuckner

@jbuckner jbuckner commented May 28, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Enable npm dependency caching via actions/setup-node cache: npm (keyed on package-lock.json) across all four workflows — ci, npm-publish, gh-pages-main, pr-preview.
  • Cache Playwright browsers (~/.cache/ms-playwright, keyed on the lockfile hash) in the two test workflows that run playwright install (ci, npm-publish). This avoids re-downloading chromium (hundreds of MB) on every run. playwright install still runs so --with-deps keeps installing the OS-level libs not stored in the cache.
  • Standardize workflow hygiene: pin Node 24 everywhere (added a setup-node step to gh-pages-main, which previously had none and relied on the runner default), switch ci/pr-preview from npm installnpm ci, and bump actions/setup-node (and ci's checkout) to v6.

Test plan

  • CI run on this PR is green.
  • First run populates the npm + Playwright caches; a subsequent run shows cache hits and a faster install / Playwright-setup step.
  • pr-preview deploys the preview successfully with the pinned Node + npm ci.

🤖 Generated with Claude Code

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>
@github-actions

github-actions Bot commented May 28, 2026

Copy link
Copy Markdown
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-05-28 20:34 UTC

jbuckner and others added 3 commits May 28, 2026 11:43
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-commenter

codecov-commenter commented May 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.75%. Comparing base (bb9c6de) to head (adf40e5).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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>

@latonv latonv left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No blockers found, LGTM

@jbuckner jbuckner merged commit 9a3b0f3 into main May 28, 2026
3 checks passed
@jbuckner jbuckner deleted the WEBDEV-8518-ci-caching branch May 28, 2026 20:34
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
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.

3 participants