You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This document describes updating the [examples](../examples) in this repository to use the latest Cypress version.
4
+
5
+
## Examples
6
+
7
+
There are two groups of examples which are used to test and demonstrate the use of [cypress-io/github-action](https://github.com/cypress-io/github-action):
8
+
9
+
1. The [examples](../examples) directory contains examples of the use of Cypress (Current) [Configuration](https://docs.cypress.io/guides/references/configuration) which applies to Cypress 10 and later.
10
+
11
+
2. The [examples/v9](../examples/v9) directory contains examples which are set up to use Cypress `9.7.0` which is the last version using [Legacy Configuration](https://docs.cypress.io/guides/references/legacy-configuration) which applies to Cypress 9 and below.
12
+
13
+
The examples make use of [npm](https://www.npmjs.com/), [pnpm](https://pnpm.io/) and [Yarn 1 (Classic)](https://classic.yarnpkg.com/) to define and install the packages being used.
14
+
15
+
## Prerequisites
16
+
17
+
- A local system running [Ubuntu](https://ubuntu.com/), [Microsoft Windows](https://www.microsoft.com/windows/) or [Apple macOS](https://www.apple.com/macos/).
18
+
19
+
- The LTS version of [Node.js](https://nodejs.org/). For convenience of switching to other versions of Node.js, [nvm](https://github.com/nvm-sh/nvm) for unix, macOS and windows WSL. For Windows [nvm-windows](https://github.com/coreybutler/nvm-windows).
20
+
21
+
-[git](https://git-scm.com/) distributed version control system.
22
+
23
+
-[npm](https://www.npmjs.com/), which is installed with [Node.js](https://nodejs.org/)
24
+
25
+
-[pnpm](https://pnpm.io/) installed through:
26
+
27
+
```bash
28
+
npm install pnpm@latest -g
29
+
```
30
+
31
+
This needs to be repeated if you change the base node version using nvm.
Again, this needs to be repeated if you change the base node version using nvm.
40
+
41
+
-[Visual Studio Code](https://code.visualstudio.com/) or other editor
42
+
43
+
## Updating examples
44
+
45
+
When a new version of [Cypress](https://docs.cypress.io/guides/references/changelog) is published, the examples can be updated.
46
+
47
+
From the root of a local clone of the repository, execute:
48
+
49
+
```bash
50
+
npm run update:cypress
51
+
```
52
+
53
+
This updates all [examples](../examples) (except [examples/v9](../examples/v9)) to cypress@latest.
54
+
55
+
[.github/workflows/example-install-only.yml](../.github/workflows/example-install-only.yml) contains a hard-coded Cypress version number. This can be updated by hand.
56
+
57
+
After updating the examples locally, they can be committed with git and a pull request opened on GitHub.
0 commit comments