-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
CI: add caching. #605
CI: add caching. #605
Conversation
If any of the following files changes, the cache will be invalidated: * package.json * package-lock.json * .github/workflows/ci.yml
key: ${{ runner.os }}-node-v${{ matrix.node-version }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}-${{ hashFiles('.github/workflows/ci.yml') }} | ||
restore-keys: | | ||
${{ runner.OS }}-node-v${{ matrix.node-version }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}-${{ hashFiles('.github/workflows/ci.yml') }} | ||
${{ runner.OS }}-node-v${{ matrix.node-version }}- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I will remove this so that when one of the above files change cache is invalidated. Better have this as a fallback mechanism. WDYT?
Hey @XhmikosR from our understanding of the caching action we're not sure we would see any benefits. The rational being, with the key combination of I think at the moment we'll forgo adding a cache to the CI specifically in This is definitely an improvement we'll want to look at in the future if testing and coverage get a little more involved, and perhaps in some of the dependencies of the Thanks so much for the suggestion, we didn't know that there was a caching action available! 👍🏽 (I'm closing the comment, but not the conversation. Please reach out if you think we've made a mistake) |
Just FYI this is almost the same logic Travis CI is using. The benefits aren't huge, I agree. But this could tweaked further as needed. |
If any of the following files changes, the cache will be invalidated:
This can probably be simplified but it should be a first start. Feel free to push any further changes to this branch.