@cypress/github-action 5.3.1 → 5.5.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 +54 -11
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -35,6 +35,9 @@
|
|
|
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 Modern](#yarn-modern)
|
|
40
|
+
- use [Yarn workspaces](#yarn-workspaces)
|
|
38
41
|
- use [custom cache key](#custom-cache-key)
|
|
39
42
|
- run tests on multiple [Node versions](#node-versions)
|
|
40
43
|
- split [install and tests](#split-install-and-tests) into separate jobs
|
|
@@ -755,7 +758,7 @@ You can even use your own command (usually by using `npm`, `yarn`, `npx`) to wai
|
|
|
755
758
|
- uses: cypress-io/github-action@v5
|
|
756
759
|
with:
|
|
757
760
|
start: npm start
|
|
758
|
-
wait-on: 'npx wait-on --timeout
|
|
761
|
+
wait-on: 'npx wait-on --timeout 60000 http://localhost:3000'
|
|
759
762
|
```
|
|
760
763
|
|
|
761
764
|
See [example-wait-on.yml](.github/workflows/example-wait-on.yml) workflow file.
|
|
@@ -993,6 +996,53 @@ jobs:
|
|
|
993
996
|
|
|
994
997
|
See [cypress-gh-action-subfolders](https://github.com/bahmutov/cypress-gh-action-subfolders) (legacy) for example.
|
|
995
998
|
|
|
999
|
+
### Yarn Classic
|
|
1000
|
+
|
|
1001
|
+
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.
|
|
1002
|
+
|
|
1003
|
+
```yaml
|
|
1004
|
+
name: example-yarn-classic
|
|
1005
|
+
on: push
|
|
1006
|
+
jobs:
|
|
1007
|
+
yarn-classic:
|
|
1008
|
+
runs-on: ubuntu-22.04
|
|
1009
|
+
steps:
|
|
1010
|
+
- name: Checkout
|
|
1011
|
+
uses: actions/checkout@v3
|
|
1012
|
+
- name: Cypress run
|
|
1013
|
+
uses: cypress-io/github-action@v5
|
|
1014
|
+
with:
|
|
1015
|
+
working-directory: examples/yarn-classic
|
|
1016
|
+
```
|
|
1017
|
+
|
|
1018
|
+
See [example-yarn-classic.yml](.github/workflows/example-yarn-classic.yml) for an example.
|
|
1019
|
+
|
|
1020
|
+
[](.github/workflows/example-yarn-classic.yml)
|
|
1021
|
+
|
|
1022
|
+
### Yarn Modern
|
|
1023
|
+
|
|
1024
|
+
To install dependencies using a `yarn.lock` file from [Yarn Modern](https://yarnpkg.com/) (Yarn 2 and later) you need to override the default [Yarn 1 (Classic)](https://classic.yarnpkg.com/) installation command `yarn --frozen-lockfile`. You can do this by using the `install-command` parameter and specifying `yarn install` for example:
|
|
1025
|
+
|
|
1026
|
+
```yaml
|
|
1027
|
+
name: example-yarn-modern
|
|
1028
|
+
on: push
|
|
1029
|
+
jobs:
|
|
1030
|
+
yarn-classic:
|
|
1031
|
+
runs-on: ubuntu-22.04
|
|
1032
|
+
steps:
|
|
1033
|
+
- name: Checkout
|
|
1034
|
+
uses: actions/checkout@v3
|
|
1035
|
+
- name: Cypress run
|
|
1036
|
+
uses: cypress-io/github-action@v5
|
|
1037
|
+
with:
|
|
1038
|
+
working-directory: examples/yarn-modern
|
|
1039
|
+
install-command: yarn install
|
|
1040
|
+
```
|
|
1041
|
+
|
|
1042
|
+
See [example-yarn-modern.yml](.github/workflows/example-yarn-modern.yml) for an example.
|
|
1043
|
+
|
|
1044
|
+
[](.github/workflows/example-yarn-modern.yml)
|
|
1045
|
+
|
|
996
1046
|
### Yarn workspaces
|
|
997
1047
|
|
|
998
1048
|
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 +1214,6 @@ See [cypress-gh-action-example](https://github.com/bahmutov/cypress-gh-action-ex
|
|
|
1164
1214
|
| [cypress-gh-action-monorepo](https://github.com/bahmutov/cypress-gh-action-monorepo) | Splits install and running tests commands, runs Cypress from sub-folder |
|
|
1165
1215
|
| [cypress-gh-action-subfolders](https://github.com/bahmutov/cypress-gh-action-subfolders) (legacy) | Has separate folder for Cypress dependencies |
|
|
1166
1216
|
| [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
1217
|
| [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
1218
|
| [cypress-examples](https://github.com/bahmutov/cypress-examples) | Shows separate install job from parallel test jobs |
|
|
1170
1219
|
| [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 |
|
|
@@ -1174,17 +1223,11 @@ See [cypress-gh-action-example](https://github.com/bahmutov/cypress-gh-action-ex
|
|
|
1174
1223
|
|
|
1175
1224
|
### Installation
|
|
1176
1225
|
|
|
1177
|
-
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
|
-
|
|
1179
|
-
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:
|
|
1226
|
+
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. See the [Yarn Modern](#yarn-modern) example for instructions on installing dependencies using this later version.
|
|
1180
1227
|
|
|
1181
|
-
|
|
1182
|
-
- uses: cypress-io/github-action@v5
|
|
1183
|
-
with:
|
|
1184
|
-
install-command: yarn install
|
|
1185
|
-
```
|
|
1228
|
+
#### Minimum Node.js
|
|
1186
1229
|
|
|
1187
|
-
This action uses several production dependencies. The minimum Node version required to run this action depends on the minimum Node required by the dependencies.
|
|
1230
|
+
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
1231
|
|
|
1189
1232
|
## Debugging
|
|
1190
1233
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cypress/github-action",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.5.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",
|