Repository navigation
ci: stop setup-node caching in the SwiftPM job - #1260
Merged
Merged
Conversation
setup-node@v5 caches the packageManager from package.json automatically. The SwiftPM job never runs `yarn install`, so the Yarn cache folder never exists. On a cache miss, which happens on any PR that changes yarn.lock, the post-step save fails with "Path Validation Error" even though check-spm.mjs passed. Disable the package-manager cache for that job. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Problem
Since #1257, the
SwiftPM packagejob fails on every PR that changesyarn.lock(#1251, #1249, #1239). In those runsnode scripts/check-spm.mjspasses ("SwiftPM package checks passed."), and the job fails afterwards in setup-node's post step:actions/setup-node@v5turns on caching for the package manager named inpackage.json'spackageManagerfield. This job deliberately skipsyarn install, so the Yarn cache folder is never created. When the cache is found nothing gets saved, which is why #1257 itself was green. Whenyarn.lockchanges the cache key misses, setup-node tries to save a folder that doesn't exist, and the job fails.Fix
Set
package-manager-cache: falseon that job'ssetup-nodestep. The job doesn't use the cache anyway.Verification
This PR doesn't change
yarn.lock, so its own run can't show the failing case. After it merges,@dependabot rebaseon #1251 should turnSwiftPM packagegreen.🤖 Generated with Claude Code