-
Notifications
You must be signed in to change notification settings - Fork 359
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
test: use installed cypress version in yarn pnp example #903
Conversation
A successful run is recorded in job 8771239739. |
746f744
to
4ec2f62
Compare
@MikeMcC399 I should have looked more into npx, I thought it was acting the same as Good catch! |
Many thanks for your confirmation! I'm still ramping up on Yarn Plug'n'Play so I didn't catch this issue until after your PR was merged. npx will only install a package if one isn't already available. It will use the version defined in local dependencies if possible. |
4d6fd9b
to
a72943d
Compare
a72943d
to
fbf0f7b
Compare
Could we get this merged? It would avoid Yarn Plug'n'Play users copying an incorrect example from 73fc04a which might trip them up when new versions of Cypress are released and they have chosen to remain with an earlier version. Without this PR the action will always run with the latest version of Cypress when Yarn Modern (version 2 and later) is configured with the default setting of After the PR is merged, the action uses the version of Cypress taken from |
Hi @nagash77 |
🎉 This PR is included in version 5.8.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This PR removes the use of
yarn dlx
fromand changes running Cypress from
command: yarn dlx cypress run
tocommand: yarn cypress run
.Issue
yarn dlx cypress run
causes the latest version of Cypress to be used, with no regard of the version coming from package.json. This should not be the default way of demonstrating github-action with Yarn Plug'n'Play. The Cypress test should run using the exact version installed byyarn install
.The problem can be seen in job 8771406837 from PR #904 which reverts the example to installing Cypress 12.9.0. Despite this, the example actually runs with Cypress 12.11.0.
Verification
Install an older version of Cypress e.g. with
yarn install [email protected] -D -E
, run the workflow .github/workflows/example-yarn-modern-pnp.yml and check that the Cypress test runs with the older, selected version.