Skip to content
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

test: add yarn modern caching #1374

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

MikeMcC399
Copy link
Collaborator

@MikeMcC399 MikeMcC399 commented Feb 26, 2025

Situation

If cypress-io/github-action detects yarn.lock it assumes that Yarn v1 Classic is being used and designates ~/.cache/yarn as the cache folder.

yarn.lock is used by both Yarn v1 Classic and by Yarn Modern.

In the case of Yarn Modern, executing yarn config get cacheFolder on Linux shows that the cache is located in ~/.yarn/berry/cache.

~/.cache/yarn is the wrong folder for Yarn Modern. ~/.yarn/berry/cache is the correct folder to use for Yarn Modern.

Change

For the Yarn Modern examples add actions/setup-node, which offers the built-in optional functionality of caching npm/yarn/pnpm dependencies. It supports Yarn 1 Classic and Yarn Modern.

Workflows:

README sections

Verification

Run workflows manually:

Check cache for presence of the following, for each of the above two workflows:

cypress-linux-x64*
node-cache-Linux-x64-cache*

@cypress-app-bot
Copy link

@MikeMcC399 MikeMcC399 added documentation Improvements or additions to documentation tests labels Feb 26, 2025
@MikeMcC399 MikeMcC399 self-assigned this Feb 26, 2025
@MikeMcC399
Copy link
Collaborator Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants