test: add npm caching to pnpm examples#1043
Merged
mschile merged 1 commit intocypress-io:masterfrom Oct 23, 2023
Merged
Conversation
|
1e2fa93 to
6fa5ae3
Compare
6fa5ae3 to
e077c3e
Compare
e077c3e to
98005ed
Compare
9b52ebf to
4ed5718
Compare
This comment was marked as outdated.
This comment was marked as outdated.
Collaborator
Author
|
Are you intending to review this PR? |
|
@MikeMcC399 Sorry about that. I think we tagged the wrong person to review this! Thanks for the ping, I'll get that sorted out. |
4ed5718 to
293b208
Compare
293b208 to
7b69ec6
Compare
mschile
approved these changes
Oct 23, 2023
|
🎉 This PR is included in version 6.6.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
If
cypress-io/github-actionfinds apnpm-lock.yamlfile, it uses the pnpm commandpnpm install --frozen-lockfileby default to install dependencies. It does not however cache these dependencies for a future run of the same workflow.This PR is a workaround to the pnpm example to make up for this missing functionality.
It adds dependency caching of the pnpm store contents using the command
pnpm store pathto find the location of the store and actions/cache to cache the store contents. This is applied toThere is no change to the action itself.
Verification
Run the workflow example-basic-pnpm.yml.
Check that each of the caches under
github-action/actions/cachesmacOS-pnpm-store-*Linux-pnpm-store-*Windows-pnpm-store-*is approximately 6MB large.
Run the workflow example-basic-pnpm.yml again.
Check the logs files and examine each job.
basic-pnpm-ubuntu-20basic-pnpm-ubuntu-22basic-pnpm-on-windowsbasic-pnpm-on-macbasic-pnpm-binaryUnder the step "Cypress tests" look for the line
The number next to
downloadedmust be0.