|
35 | 35 | - pass [custom build id](#custom-build-id) when recording to Cypress Cloud
|
36 | 36 | - generate a [robust custom build id](#robust-custom-build-id) to allow re-running the workflow
|
37 | 37 | - use different [working-directory](#working-directory)
|
| 38 | +- use [Yarn Classic](#yarn-classic) |
| 39 | +- use [Yarn workspaces](#yarn-workspaces) |
38 | 40 | - use [custom cache key](#custom-cache-key)
|
39 | 41 | - run tests on multiple [Node versions](#node-versions)
|
40 | 42 | - split [install and tests](#split-install-and-tests) into separate jobs
|
@@ -993,6 +995,31 @@ jobs:
|
993 | 995 |
|
994 | 996 | See [cypress-gh-action-subfolders](https://github.com/bahmutov/cypress-gh-action-subfolders) (legacy) for example.
|
995 | 997 |
|
| 998 | +### Yarn Classic |
| 999 | + |
| 1000 | +If a `yarn.lock` file is found, the action uses the [Yarn 1 (Classic)](https://classic.yarnpkg.com/) command `yarn --frozen-lockfile` by default to install dependencies. |
| 1001 | + |
| 1002 | +```yaml |
| 1003 | +name: example-yarn-classic |
| 1004 | +on: push |
| 1005 | +jobs: |
| 1006 | + yarn-classic: |
| 1007 | + runs-on: ubuntu-22.04 |
| 1008 | + steps: |
| 1009 | + - name: Checkout |
| 1010 | + uses: actions/checkout@v3 |
| 1011 | + - name: Cypress run |
| 1012 | + uses: cypress-io/github-action@v5 |
| 1013 | + with: |
| 1014 | + working-directory: examples/yarn-classic |
| 1015 | +``` |
| 1016 | + |
| 1017 | +See [example-yarn-classic.yml](.github/workflows/example-yarn-classic.yml) for an example. |
| 1018 | + |
| 1019 | +[](.github/workflows/example-yarn-classic.yml) |
| 1020 | + |
| 1021 | +See below under [Yarn Modern](#yarn-modern) (version 2 and later) for instructions on installing dependencies using this later version. |
| 1022 | + |
996 | 1023 | ### Yarn workspaces
|
997 | 1024 |
|
998 | 1025 | This action should discover the Yarn workspaces correctly. For example, see folder [examples/start-and-yarn-workspaces](examples/start-and-yarn-workspaces) and workflow file [example-start-and-yarn-workspaces.yml](.github/workflows/example-start-and-yarn-workspaces.yml)
|
@@ -1175,15 +1202,19 @@ See [cypress-gh-action-example](https://github.com/bahmutov/cypress-gh-action-ex
|
1175 | 1202 |
|
1176 | 1203 | This action installs local dependencies using lock files. If `yarn.lock` file is found, the install uses `yarn --frozen-lockfile` command. Otherwise it expects to find `package-lock.json` and install using `npm ci` command.
|
1177 | 1204 |
|
1178 |
| -The above default `yarn` installation command can be replaced for [Yarn Berry](https://yarnpkg.com/) (Yarn 2 and later) using the `install-command` parameter, for example: |
| 1205 | +#### Yarn Modern |
| 1206 | + |
| 1207 | +The above default `yarn` installation command can be replaced for [Yarn Modern](https://yarnpkg.com/) (Yarn 2 and later) using the `install-command` parameter, for example: |
1179 | 1208 |
|
1180 | 1209 | ```yml
|
1181 | 1210 | - uses: cypress-io/github-action@v5
|
1182 | 1211 | with:
|
1183 | 1212 | install-command: yarn install
|
1184 | 1213 | ```
|
1185 | 1214 |
|
1186 |
| -This action uses several production dependencies. The minimum Node version required to run this action depends on the minimum Node required by the dependencies. |
| 1215 | +#### Minimum Node.js |
| 1216 | + |
| 1217 | +This action uses several production dependencies. The minimum Node version required to run this action depends on the minimum Node version required by the dependencies. |
1187 | 1218 |
|
1188 | 1219 | ## Debugging
|
1189 | 1220 |
|
|
0 commit comments