-
Notifications
You must be signed in to change notification settings - Fork 353
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
fix: use yarn instead of npx with yarn.lock #914
Conversation
Job 8937982597 shows successful selection of
|
Question: Any plans to use this same approach on the cypress test run itself? That seems to be the only other place hardcoded to I did run this on our internal code to test and it was able to find and use my installed cypress version so this PR is working great for us! Thanks! |
Thanks very much for cross-checking this PR on your own repo. That is very valuable!
|
@MikeMcC399 Awesome, sounds good! Thanks for putting in fixes for this stuff, I know my team definitely appreciates it. 😄 |
9f6f47c
to
ade1551
Compare
19a63af
to
8af941e
Compare
@nagash77 |
a3cd69d
to
8e7ff55
Compare
Is there any chance you could review this PR sometime soon? |
@MikeMcC399 Looking at this now. Sorry for the delay. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two small requests
Co-Authored-By: Stokes Player <[email protected]>
Thank you for your review! I included your suggestion for code optimization. All tests are passing, including the specific verification tests I listed in the original post. |
🎉 This PR is included in version 5.8.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This reverts commit e08da49.
Co-authored-by: Stokes Player <[email protected]>
Co-authored-by: Stokes Player <[email protected]>
|
This PR resolves an issue calling commands
cypress cache list
andcypress cache verify
if the project is using Yarn Plug'n'Play (introduced through PR #599 from @PilotConway). In this case the commands were not finding the installed version of Cypress.Changes
The following commands, which are called internally by the action, are replaced if the action is working from a
yarn.lock
file. This is the case for Yarn Classic and Yarn Modern projects. Although the issue only affects Yarn Modern using Yarn Plug'n'Play configuration, the change is activated for all types of Yarn projects.The following commands are retained for
npm
andpnpm
projects:For Yarn projects they are changed to use instead:
Issue
When .github/workflows/example-yarn-modern-pnp.yml is run, it shows
npx
being called and not finding the installed version of cypress.For example job 4959218510 shows:
With Yarn Plug'n'Play there is no directory
node_modules
set up and therefore npx cannot findcypress
and it installs instead the latest version, which may or may not correspond to the version specified inyarn.lock
.Verification
Check the workflow results:
npx
when callingcypress cache list
orcypress verify
.yarn
when callingcypress cache list
andcypress verify
. Only one version of Cypress should be shown bycypress cache list
.