fix(ci): use portable paths in cache-ui-dependencies#19310
Draft
fix(ci): use portable paths in cache-ui-dependencies#19310
Conversation
|
Skipping CI for Draft Pull Request. |
Contributor
|
Images are ready for the commit at ea27cb8. To use with deploy scripts, first |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #19310 +/- ##
==========================================
- Coverage 49.65% 49.64% -0.01%
==========================================
Files 2689 2689
Lines 202505 202505
==========================================
- Hits 100552 100540 -12
- Misses 94460 94468 +8
- Partials 7493 7497 +4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Replace container-specific /github/home/ paths with ~/ which resolves correctly in both container jobs (HOME=/github/home) and on-host runner jobs (HOME=/home/runner). Also add a 'save' input parameter for callers that need to force cache saves outside the default branch, and a verification step that logs cache directory sizes for observability. Tested: the new portable-path v2 entry is saved on first run and restored on subsequent runs. Cache hit restores ~299 MB (~136M .npm, ~739M Cypress). The ~1 min cold-run penalty is negligible against the ~30 min job duration. Generated with the assistance of AI. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
b55faed to
ea27cb8
Compare
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.
Description
Replace container-specific
/github/home/paths with~/in thecache-ui-dependenciescomposite action.Problem: The action hardcodes
/github/home/.npmand/github/home/.cache/Cypress. This path only works inside GitHub Actions containers whereHOME=/github/home. On-host runner jobs useHOME=/home/runner, so the cache misses.Fix: Use
~/which resolves correctly in both contexts:~→/github/home(no change in behavior)~→/home/runner(now works)Cache key bumped from
npm-v2tonpm-v3to avoid restoring stale entries with the old path layout. First run after merge will be a cache miss; repopulated on the next push to master.User-facing documentation
Testing and quality
Automated testing
How I validated my change
~expands to$HOMEin both container (/github/home) and host (/home/runner) contexts. Theactions/cacheaction supports tilde expansion. Existing container workflows see no path change since their HOME is already/github/home.