-
Notifications
You must be signed in to change notification settings - Fork 347
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
Add workspace support for pnpm #1144
Comments
This comment was marked as resolved.
This comment was marked as resolved.
|
This comment was marked as resolved.
This comment was marked as resolved.
Good you found your problem! I don't have privileges to delete other people's posts. You can however delete your own posts or select Hide from the three-dot menu and hide your post(s) from being displayed. |
hello, I've just noticed one more problem with pnpm workspace. After latest release of action it shows that there is cypress '13.9.0' cached but later it fails to find binaries for '13.8.1' as our tests use it. I followed start-and-pnpm-workspaces and it worked like a charm until today ) Seems a bit similar to #971 Thank you 🙇🏻 |
Please open a new issue if you are asking for help. This issue is for the pnpm workspace support enhancement request, not any bug reports about the existing implementation or documentation. |
I added a comment there as I thought that might be in scope of "workspace support"
For now I just upgraded local cypress version to match the version installed by the github action. Just was a bit surprised that action can't read correct version from pnpm-lock |
I tested start-and-pnpm-workspaces with Cypress If you need to have mixed Cypress versions in your pnpm workspaces and it is not working for you, then we can look at it in a separate issue. We would need to see your workflow and your lock file for that. |
got it. I will keep an eye on it and if it reproduces again will create new issue with reproduction |
|
What would you like
When the
cypress-io/github-action
processes a project with apnpm-lock.yaml
lockfile from the pnmp package manager it should be able to interpret pnpm workspaces correctly and run Cypress from a pnpm workspace, including dependency installation and caching.For example, the following should work:
This fails because Cypress can't find
pnpm-lock.yaml
to install dependencies.Why is this needed?
The workspace of a pnpm project does not contain any
pnpm-lock.yaml
file andcypress-io/github-action
does not read and interpret anypnpm-workspace.yaml
file in the root of a pnpm project using workspaces. This means that the action needs to be applied twice, once in the root and then again in the workspace in order to run Cypress in a pnpm workspace. (See pnpm workspaces.) This is error prone.The
cypress-io/github-action
already provides support for Yarn workspaces. Not providing this functionality for pnpm projects with workspaces is inconsistent.The benefit for users of pnpm projects with workspaces is that the workflows using GitHub Actions can be written in a more simpler way. This reduces the risk of introducing errors especially with caching the Cypress binary.
Background
pnpm has built-in support for monorepositories (AKA multi-package repositories, multi-project repositories, or monolithic repositories).
pnpm repos using workspaces and Cypress are typically structured similar to the following E2E example:
Other
pnpm workspaces
If you are using pnpm workspaces you need to install dependencies and run Cypress tests in a workspace in separate steps. The snippet below shows this principle.
See the example project start-and-pnpm-workspaces and the example-start-and-pnpm-workspaces.yml workflow for a full working example including pnpm caching.
The text was updated successfully, but these errors were encountered: