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

Automate examples update to latest Cypress version #767

Closed
MikeMcC399 opened this issue Feb 2, 2023 · 2 comments
Closed

Automate examples update to latest Cypress version #767

MikeMcC399 opened this issue Feb 2, 2023 · 2 comments

Comments

@MikeMcC399
Copy link
Collaborator

MikeMcC399 commented Feb 2, 2023

Current situation

When a new version of Cypress is released, the examples are not automatically updated to use this version.

For examples based on npm technology, scripts/npm-install-examples.sh updates Cypress to the latest version. This can be invoked manually through npm run install-deps. The settings in .npmrc determine that an exact version number is used.

In previous PRs, for instance PR #747, examples based on the Yarn 1 (Classic) package manager and the pnpm package manager were updated manually and individually:

  1. examples/start-and-yarn-workspaces was updated using:
    yarn upgrade-interactive --latest

  2. examples/install-command was updated using:
    yarn add cypress -D

  3. examples/basic-pnpm was updated using:
    pnpm update --latest

  4. The run command in .github/workflows/example-install-only.yml run: npm i cypress@12.x.x was manually edited.

examples/v9 is frozen to use the last Cypress 9.x version (9.7.0) and is not expected to change.

Suggested improvement

Provide better automation for easier updates to Cypress latest version, consistently applied.

See also #747 (review).

@MikeMcC399 MikeMcC399 changed the title Automated examples update to latest Cypress version Automate examples update to latest Cypress version Feb 2, 2023
@MikeMcC399
Copy link
Collaborator Author

@jaffrepaul

I have automated updating to Cypress latest in branch build/update-cypress-latest.

The changes are here. I will submit a PR once the backlog of open PRs has been reduced and after I have had the chance to test it a little bit more.

I replaced the original script since it wasn't a DRY (Don't Repeat Yourself) thing and instead I wrote a do-loop to go through the npm examples.

@MikeMcC399
Copy link
Collaborator Author

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

No branches or pull requests

1 participant