Cache hit- but still installs dependencies
I have not got round to debugging this - but every install takes around 50-60 seconds even with a cache hit.
Turns out its still running yarn install even after the cache has been restored? I'm assuming this is intentional, but just double checking?
I am scratching my head at how Vercel can have my app linted, built and deployed in about 30 seconds
running npm-install GitHub Action
trying to restore cached NPM modules
Received 213909504 of 1016025228 (21.1%), 202.8 MBs/sec
Received 507510784 of 10[16](https://github.com/baggers-org/baggers/actions/runs/4133267482/jobs/7143015069#step:7:17)025228 (50.0%), 241.2 MBs/sec
Received 834666496 of 1016025228 (82.2%), 264.7 MBs/sec
Received 1016025228 of 1016025228 (100.0%), 166.8 MBs/sec
Cache Size: ~969 MB (1016025228 B)
/usr/bin/tar --use-compress-program unzstd -xf /home/runner/work/_temp/629c9279-ec08-4380-a001-0102ec23681a/cache.tzst -P -C /home/runner/work/baggers/baggers
Cache restored successfully
npm cache hit yarn-linux-x64-0c361b3f98[17](https://github.com/baggers-org/baggers/actions/runs/4133267482/jobs/7143015069#step:7:18)54db7e96963a680976f4f1f0f44bf27fa237e37038447cfcbb00fab9bd840efc668af33fb9e06660f3f9de668a3e056a0360548c7e6a571c1c30
installing NPM dependencies using Yarn
yarn at "/usr/local/bin/yarn"
/usr/local/bin/yarn --frozen-lockfile
yarn install v1.22.[19](https://github.com/baggers-org/baggers/actions/runs/4133267482/jobs/7143015069#step:7:20)
[1/5] Validating package.json...
[2/5] Resolving packages...
[3/5] Fetching packages...
[4/5] Linking dependencies...
Sorry to "+1" but I'm also interested in whether it's expected to still run yarn install after a cache hit.
@bahmutov another +1, this is surprising, can you provide context on this? Install step for me currently takes >1 min with a cache hit (>3 min with no cache hit) but could be ~seconds if we skip the actual install I believe.
Facing the same issue here.
It's a small project and not taking too much time to install, but it still feels weird that it installs after a cache hit
This caches the local npm cache, not your node_modules. After a cache hit, npm should install from the cached local npm cache instead of from an empty local npm cache. If you want to check if this is giving any gain, compare the time it takes to run this step without and with a cache hit.