@cypress/github-action 5.3.1 → 5.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +34 -4
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -35,6 +35,8 @@
|
|
|
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
|
|
@@ -755,7 +757,7 @@ You can even use your own command (usually by using `npm`, `yarn`, `npx`) to wai
|
|
|
755
757
|
- uses: cypress-io/github-action@v5
|
|
756
758
|
with:
|
|
757
759
|
start: npm start
|
|
758
|
-
wait-on: 'npx wait-on --timeout
|
|
760
|
+
wait-on: 'npx wait-on --timeout 60000 http://localhost:3000'
|
|
759
761
|
```
|
|
760
762
|
|
|
761
763
|
See [example-wait-on.yml](.github/workflows/example-wait-on.yml) workflow file.
|
|
@@ -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)
|
|
@@ -1164,7 +1191,6 @@ See [cypress-gh-action-example](https://github.com/bahmutov/cypress-gh-action-ex
|
|
|
1164
1191
|
| [cypress-gh-action-monorepo](https://github.com/bahmutov/cypress-gh-action-monorepo) | Splits install and running tests commands, runs Cypress from sub-folder |
|
|
1165
1192
|
| [cypress-gh-action-subfolders](https://github.com/bahmutov/cypress-gh-action-subfolders) (legacy) | Has separate folder for Cypress dependencies |
|
|
1166
1193
|
| [cypress-gh-action-split-install](https://github.com/bahmutov/cypress-gh-action-split-install) (legacy) | Only install NPM dependencies, then install and cache Cypress binary yourself |
|
|
1167
|
-
| [test-personal-site](https://github.com/bahmutov/test-personal-site) (legacy) | Testing an external website every night and by manually clicking a button |
|
|
1168
1194
|
| [cypress-gh-action-changed-files](https://github.com/bahmutov/cypress-gh-action-changed-files) (legacy) | Shows how to run different Cypress projects depending on changed files |
|
|
1169
1195
|
| [cypress-examples](https://github.com/bahmutov/cypress-examples) | Shows separate install job from parallel test jobs |
|
|
1170
1196
|
| [cypress-gh-action-split-jobs](https://github.com/bahmutov/cypress-gh-action-split-jobs) (legacy) | Shows a separate install job with the build step, and another job that runs the tests |
|
|
@@ -1176,7 +1202,9 @@ See [cypress-gh-action-example](https://github.com/bahmutov/cypress-gh-action-ex
|
|
|
1176
1202
|
|
|
1177
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.
|
|
1178
1204
|
|
|
1179
|
-
|
|
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:
|
|
1180
1208
|
|
|
1181
1209
|
```yml
|
|
1182
1210
|
- uses: cypress-io/github-action@v5
|
|
@@ -1184,7 +1212,9 @@ The above default `yarn` installation command can be replaced for [Yarn Berry](h
|
|
|
1184
1212
|
install-command: yarn install
|
|
1185
1213
|
```
|
|
1186
1214
|
|
|
1187
|
-
|
|
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.
|
|
1188
1218
|
|
|
1189
1219
|
## Debugging
|
|
1190
1220
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cypress/github-action",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.4.0",
|
|
4
4
|
"description": "GitHub Action for running Cypress end-to-end and component tests",
|
|
5
5
|
"private": false,
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"quote": "0.4.0"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@types/node": "18.
|
|
47
|
+
"@types/node": "18.15.3",
|
|
48
48
|
"@vercel/ncc": "0.36.1",
|
|
49
49
|
"husky": "7.0.4",
|
|
50
50
|
"markdown-link-check": "3.10.3",
|