-
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
Is there a way to partially cache dependencies? #321
Comments
Hello @oscard0m. Thank you for your report. The task does not support of caching partially dependencies. Caching in setup-node use global directory from |
Thanks for the quick and concise reply @dmitry-shibanov 👏🏽 . I would like to explore what are the existing possibilities on supporting this. For instance, I was checking What do you think @dmitry-shibanov |
@oscard0m , unfortunately, we don't have much context with May be some tricks with Another possible solution is adding the following step after at the end of your workflow (approximate code, I didn't test it but can help to understand the idea): - run: |
cache_path=$(npm config get cache)
dep_path="$cache_path/dependencyname"
rm -rf $dep_path
shell: bash The single concern from my side is that we would like to keep caching functionality in setup-node as simple as possible.
|
Thanks for getting back to me @maxim-lobanov and thanks for your feedback and suggestion. My next steps will be:
In the meantime, I'm proceeding to close this issue and refer to it in the steps I previously mentioned. EDIT: I just found npm 7.21 released the feature of removing certain keys from the cache |
Context
Tried to add
cache: npm
to TypeScript's workflows but we become with a blocker: Is it possible to not cache some of the dependencies?:Issue: microsoft/TypeScript#44924
Originally asked here
I would like to know if there is a way to cache most of the dependencies but to make sure some of them are not being cached with
actions/setup-node
oractions/cache
. As far as I understand there's not an option with latestcache
option .The text was updated successfully, but these errors were encountered: