[core] Update yarn cache in github action #3191
Merged
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.
Currently, the
yarn
cache in thepull_request
always misses. The total time to install dependencies take ~2 minutes.This PR fixes this issue by using the latest
setup-node@v3
.With the new cache, it takes ~30 seconds to download the cache, and ~1 minute 10 seconds to install the dependencies. So in total it saves 20 seconds. It's not a huge improvement because the cache size is very large and it takes a while to download.
Also there are no more deprecated
set-output
/save-state
command warnings.Please note that the cache will only start to work on the second run. So on this PR, the installation time will remain the same. But here is a screenshot of subsequent runs: