Closed
Description
I was excited to see the blog post GitHub Actions: Setup-node now supports dependency caching. However, it's not clear to me what this caching actually means. From the README:
README.md
Caching yarn dependencies:
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '14'
cache: 'yarn'
- run: yarn install
- run: yarn test
Yarn caching handles both yarn versions: 1 or 2.
Caching can mean many things when it comes to Yarn 2, for example, these questions come to mind:
- Is the
node_modules
folder cached? - When Yarn runs in the PnP mode, is
.yarn/cache
cached instead? - Or is it the local cache of downloaded tarballs (
~/.cache/yarn
) that is cached? - How is the caching done? Is it a local filesystem that is re-attached for future runs of the job or is the "slow" approach of @actions/cache that just uploads / downloads files to some S3-like blob storage? (I think we tested it and it wasn't even faster than downloading dependencies from registry.npmjs.com over and over.)
Some clarifications would be appreciated 🙏.
Metadata
Metadata
Assignees
Labels
No labels