-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Seems caching is not working #416
Comments
Hello @sztadii. Thank you for your report. Actually the setup-node action does not cache |
@dmitry-shibanov then the "Caching packages dependencies" title is misleading, I think it should be changed. |
I too, thought it would cache my node_modules, and assumed it would bust the cache when the defined lock file changed? The whole feature is quite misleading. |
I agree, I think that makes the statements on https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows that imply you should use |
I too hit into this when trying to optimise a CI pipeline, and was misled. |
It could also be related to this PR: #323 |
I had the same question, and this article pointed out that you actually want to use |
Hello everyone. We updated documentation in scope of this pull request. For now I'm going to close the issue. If you have any concerns feel free to ping us. |
I see that you have updated the docs since this issue were opened, but could you also add a comment about what that means? What is the purpose of caching the global cache directory? When do I need this feature? Would caching node_modules not be a good idea (for me and/or for setup-node)? |
…ions#416) Bumps [eslint-plugin-prettier](https://github.com/prettier/eslint-plugin-prettier) from 4.0.0 to 4.2.1. - [Release notes](https://github.com/prettier/eslint-plugin-prettier/releases) - [Changelog](https://github.com/prettier/eslint-plugin-prettier/blob/master/CHANGELOG.md) - [Commits](prettier/eslint-plugin-prettier@v4.0.0...v4.2.1) --- updated-dependencies: - dependency-name: eslint-plugin-prettier dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
I think the misunderstanding comes from outside of this actual repo, in a way how that caching concept is described in a workflows 101 article in GitHub Docs:
That basically reads what everyone in this thread also thinks: Using Is there a way how this difference in mental model and expectations mismatch can be fixed documentation-wise? (I myself still don't know how to describe the difference in caching the |
For future readers, I've setup caching/restore of Here's relevant yaml from our action that caches our node_modules across our monorepo:
|
Description:
I used the cache option in one of my public repos, but dependencies are getting installed again.
I do not see any difference in the pipeline duration when I run it with or without cache.
https://github.com/sztadii/crypto-dashboard/actions
Action version:
Specify the action version
Platform:
Runner type:
Tools version:
node 14.19.0
The text was updated successfully, but these errors were encountered: