Skip to content

test: add yarn modern caching #1374

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

Merged

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

This comment was marked as resolved.

@MikeMcC399 MikeMcC399 force-pushed the add/yarn-modern-caching branch 2 times, most recently from 6f73794 to 7871c68 Compare March 11, 2025 18:33
@MikeMcC399

This comment was marked as resolved.

@MikeMcC399 MikeMcC399 force-pushed the add/yarn-modern-caching branch from 3308a7a to 60d085d Compare March 17, 2025 05:44
@MikeMcC399
Copy link
Collaborator Author

Marking this PR as ready for review

@MikeMcC399 MikeMcC399 marked this pull request as ready for review March 17, 2025 05:52
@jennifer-shehane jennifer-shehane merged commit a80b62e into cypress-io:master Mar 17, 2025
74 checks passed
@MikeMcC399 MikeMcC399 deleted the add/yarn-modern-caching branch March 17, 2025 13:56
MikeMcC399 added a commit to MikeMcC399/github-action that referenced this pull request Mar 18, 2025
Copy link

🎉 This PR is included in version 6.8.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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 released tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants