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

docs: Note that GHA doesn't support any caching for pnpm #5880

Closed
wants to merge 1 commit into from
Closed

docs: Note that GHA doesn't support any caching for pnpm #5880

wants to merge 1 commit into from

Conversation

bmulholland
Copy link

@bmulholland bmulholland commented Jul 26, 2024

Ideally there'd be an official recommendation or something here, but of course I can't speak to that.

See also cypress-io/github-action#1044

Copy link

netlify bot commented Jul 26, 2024

👷 Deploy request for cypress-docs pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit ffa5770

@CLAassistant
Copy link

CLAassistant commented Jul 26, 2024

CLA assistant check
All committers have signed the CLA.

@cypress-app-bot
Copy link
Collaborator

@MikeMcC399
Copy link
Contributor

This may be a bug rather than missing functionality. It needs further investigation.

@bmulholland
Copy link
Author

bmulholland commented Jul 29, 2024

AFAICT the issue is that, while deps are cached, Cypress installs binaries in a place that is cached. The official cypress.io recommendation is to cache that binary install location, too, but then the two can get out of sync. When they do, you may have the package cache, but not the binary cache, and then the job would fail.

There's a silly-obvious approach of "give me a command to run that fetches the binaries if they don't exist," which is what playwright has for browsers. Cypress seems fixed on maintaining the magical "npm install"-only experience, and that leads to this problem.

@MikeMcC399
Copy link
Contributor

@bmulholland

@bmulholland
Copy link
Author

Yeah sorry, I mis-typed. The "browser" part is actually the Cypress binary. The substance of my comment remains the same.

@MikeMcC399
Copy link
Contributor

@bmulholland

Yeah sorry, I mis-typed. The "browser" part is actually the Cypress binary. The substance of my comment remains the same.

Perhaps you could edit your post and substitute the correct terms in that case? I may have misunderstood you even given the substitution, but pnpm cypress install is the command that will install the Cypress binary if it is missing.

A caching recommendation has been re-instated. See
https://github.com/cypress-io/github-action/blob/master/README.md#pnpm

@MikeMcC399
Copy link
Contributor

This PR adds text to an example using npm, not pnpm, so it would need more explanation to cover npm, Yarn and pnpm at this point.

I would defer to https://github.com/cypress-io/github-action/blob/master/README.md for all detailed information and try to keep the description on the docs site simple.

The comment about cache advisory is no longer true:

The Cypress Github Action does not do any caching for pnpm, and
[advises not to use any caching of any form](https://github.com/cypress-io/github-action?tab=readme-ov-file#pnpm).

My preference would be to not pursue this PR further.

@bmulholland bmulholland deleted the patch-2 branch August 1, 2024 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants