Closed Lykhoyda closed 1 year ago
There is more steps then just fetching modules. It takes the 30s because downloading 0.5Gb is not instant + yarn resolution and post-building steps.
I'm focusing on the step "Install deps" where we clearly have one command:
yarn --prefer-offline --frozen-lockfile
The cache is 146 MB and should be read from the disk. Wherever we have this step in other jobs it still takes 20-34 seconds to finish.
In the cache output we see the reading speed of 36 MB per second:
Received 75241672 of 75241672 (100.0%), 36.5 MBs/sec
Cache Size: ~72 MB (75241672 B)
I think I'm not the only one confused. These articles can clarify the way it works. We can close the issue:
https://github.com/actions/setup-node/issues/304 https://stackoverflow.com/questions/70201071/setup-node-restoring-cache-but-still-takes-a-while-to-yarn
Describe the bug We implemented the caching for ci using actions/setup-node@v3 GitHub action. During the step run "Install dependency", it still takes near 30 seconds to finish the step. Per my understanding, if modules are cached it should take much less for execution. We could try to configure the cache using https://github.com/marketplace/actions/cache to see if there is any difference. It's adding at least more information about the caching.
To Reproduce see the jobs and step "Install deps" https://github.com/ChainSafe/dappeteer/actions/runs/4175040807/jobs/7229413988