Skip to content

Latest commit

 

History

History
57 lines (32 loc) · 3.09 KB

MAINTENANCE.md

File metadata and controls

57 lines (32 loc) · 3.09 KB

Maintenance

This document describes updating the examples in this repository to use the latest Cypress version.

Examples

The examples directory contains examples of the use of Cypress (Current) Configuration which applies to Cypress 10 and later. These examples test and demonstrate the use of cypress-io/github-action.

The examples make use of npm, pnpm, Yarn 1 (Classic) and Yarn Modern to define and install the packages being used. For Yarn Modern the recommended Corepack is used as a Yarn version manager.

The previous examples/v9 are archived in the v5 branch. This directory contains examples which were set up to use Cypress 9.7.0, the last version using Legacy Configuration, covering Cypress 9 and below. These v9 examples are no longer maintained.

Requirements

npm install pnpm@latest -g

Under Microsoft Windows it may be necessary to also execute the following preparatory command:

npm config set script-shell "C:\\Program Files\\git\\bin\\bash.exe" --location user

Updating examples

When a new version of Cypress is published, the examples can be updated.

From the root of a local clone of the repository, execute:

npm run update:cypress

This updates all examples to cypress@latest.

.github/workflows/example-install-only.yml contains a hard-coded Cypress version number. This can be updated by hand.

After updating the examples locally, they can be committed with git and a pull request opened on GitHub.

Updating Yarn examples

The script /scripts/update-cypress-latest-yarn.sh (which is invoked through npm run update:cypress to update the Yarn examples) runs Yarn 1 (Classic) as an npm global install, runs Yarn Modern through Corepack and returns Corepack to its default disabled state on completion.