@cypress/github-action 5.6.1 → 5.7.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 CHANGED
@@ -1,12 +1,12 @@
1
- # cypress-io/github-action [![renovate-app badge][renovate-badge]][renovate-bot] [![Action status](https://github.com/cypress-io/github-action/workflows/main/badge.svg?branch=master)](https://github.com/cypress-io/github-action/actions)
1
+ # cypress-io/github-action [![Action status][ci-badge]][ci-workflow] [![cypress][cloud-badge]][cloud-project] [![renovate-app badge][renovate-badge]][renovate-bot]
2
2
 
3
- > [GitHub Action](https://docs.github.com/en/actions) for running [Cypress](https://www.cypress.io) end-to-end and component tests. Includes NPM installation, custom caching and lots of configuration options.
3
+ > [GitHub Action](https://docs.github.com/en/actions) for running [Cypress](https://www.cypress.io) end-to-end and component tests. Includes npm, pnpm and Yarn installation, custom caching and lots of configuration options.
4
4
 
5
5
  ## Examples
6
6
 
7
7
  - [End-to-End](#end-to-end-testing) testing
8
8
  - [Component](#component-testing) testing
9
- - [Explicit version](#explicit-version)
9
+ - Select [action version](#action-version)
10
10
  - Run tests in a given [browser](#browser)
11
11
  - using [Chrome](#chrome)
12
12
  - using [Firefox](#firefox)
@@ -17,8 +17,8 @@
17
17
  - Run only some [spec files](#specs)
18
18
  - Test [project in subfolder](#project)
19
19
  - [Record results](#record-test-results-on-cypress-cloud) on Cypress Cloud
20
- - Specify [auto cancel](#specify-auto-cancel-after-failures) after failures
21
20
  - Tag [recordings](#tag-recordings)
21
+ - Specify [auto cancel](#specify-auto-cancel-after-failures) after failures
22
22
  - Store [test artifacts](#artifacts) on GitHub
23
23
  - [Quiet output](#quiet-flag)
24
24
  - Set Cypress [config values](#config)
@@ -29,31 +29,36 @@
29
29
  - [Start server](#start-server) before running the tests
30
30
  - [Start multiple servers](#start-multiple-servers) before running the tests
31
31
  - [Wait for server](#wait-on) to respond before running the tests
32
- - use [custom install command](#custom-install-command)
33
- - use [command prefix](#command-prefix)
34
- - use [own custom test command](#custom-test-command)
35
- - pass [custom build id](#custom-build-id) when recording to Cypress Cloud
36
- - generate a [robust custom build id](#robust-custom-build-id) to allow re-running the workflow
37
- - use different [working-directory](#working-directory)
38
- - use [pnpm](#pnpm)
39
- - use [Yarn Classic](#yarn-classic)
40
- - use [Yarn Modern](#yarn-modern)
41
- - use [Yarn workspaces](#yarn-workspaces)
42
- - use [custom cache key](#custom-cache-key)
43
- - run tests on multiple [Node versions](#node-versions)
44
- - split [install and tests](#split-install-and-tests) into separate jobs
45
- - use [custom install commands](#custom-install)
46
- - install [only Cypress](#install-cypress-only) to avoid installing all dependencies
47
- - [timeouts](#timeouts) to avoid hanging CI jobs
48
- - [print Cypress info](#print-cypress-info) like detected browsers
49
- - [run tests nightly](#nightly-tests) or on any schedule
50
- - [Suppress test summary](#suppress-test-summary)
51
- - [more examples](#more-examples)
32
+ - [`wait-on` with Node.js 18+](#wait-on-with-nodejs-18) workarounds
33
+ - Use [custom install command](#custom-install-command)
34
+ - Use [command prefix](#command-prefix)
35
+ - Use [own custom test command](#custom-test-command)
36
+ - Pass [custom build id](#custom-build-id) when recording to Cypress Cloud
37
+ - Generate a [robust custom build id](#robust-custom-build-id) to allow re-running the workflow
38
+ - Use different [working-directory](#working-directory)
39
+ - Use [subfolders](#subfolders)
40
+ - Use [pnpm](#pnpm)
41
+ - Use [Yarn Classic](#yarn-classic)
42
+ - Use [Yarn Modern](#yarn-modern)
43
+ - Use [Yarn Plug'n'Play](#yarn-plugnplay)
44
+ - Use [Yarn workspaces](#yarn-workspaces)
45
+ - Use [custom cache key](#custom-cache-key)
46
+ - Run tests on multiple [Node versions](#node-versions)
47
+ - Split [install and tests](#split-install-and-tests) into separate jobs
48
+ - Use [custom install commands](#custom-install)
49
+ - Install [only Cypress](#install-cypress-only) to avoid installing all dependencies
50
+ - Use [timeouts](#timeouts) to avoid hanging CI jobs
51
+ - Print [Cypress info](#print-cypress-info) like detected browsers
52
+ - Run [tests nightly](#nightly-tests) or on any schedule
53
+ - Suppress [test summary](#suppress-test-summary)
54
+ - [More examples](#more-examples)
52
55
 
53
56
  Current examples contained in this repository are based on Cypress 12.x and can be found in the [examples](./examples) directory. Examples for [Legacy Configuration](https://on.cypress.io/guides/references/legacy-configuration) use Cypress `9.7.0` and are kept in the [examples/v9](./examples/v9) directory.
54
57
 
55
58
  Some older **external** examples, linked to by this document, are based solely on Cypress 9 and below and therefore use a [Legacy Configuration](https://on.cypress.io/guides/references/legacy-configuration). These may need modification to be applied to Cypress 10 and later. Each of these external links is listed with a `(legacy)` notation.
56
59
 
60
+ **Note:** this package assumes that [cypress](https://www.npmjs.com/package/cypress) is declared as a development dependency in the [package.json](https://docs.npmjs.com/creating-a-package-json-file) file. The [cypress npm module](https://www.npmjs.com/package/cypress) is required to run Cypress via its [Module API](https://on.cypress.io/module-api).
61
+
57
62
  ### End-to-End Testing
58
63
 
59
64
  ```yml
@@ -65,7 +70,7 @@ jobs:
65
70
  steps:
66
71
  - name: Checkout
67
72
  uses: actions/checkout@v3
68
- # Install NPM dependencies, cache them correctly
73
+ # Install npm dependencies, cache them correctly
69
74
  # and run all Cypress tests
70
75
  - name: Cypress run
71
76
  uses: cypress-io/github-action@v5
@@ -77,8 +82,6 @@ The workflow file [example-basic.yml](.github/workflows/example-basic.yml) shows
77
82
 
78
83
  This workflow uses the default [test type](https://on.cypress.io/guides/overview/why-cypress#Test-types) of [End-to-End (E2E) Testing](https://on.cypress.io/guides/overview/why-cypress#End-to-end). Alternatively, [Component Testing](https://on.cypress.io/guides/overview/why-cypress#Component) can be utilized by referencing the [Component Testing](#component-testing) section below.
79
84
 
80
- **Note:** this package assumes that `cypress` is declared as a development dependency in the `package.json` file. The `cypress` NPM module is required to run Cypress via its [NPM module API](https://on.cypress.io/module-api).
81
-
82
85
  ### Component Testing
83
86
 
84
87
  To use [Cypress Component Testing](https://on.cypress.io/component-testing) add `component: true`
@@ -102,25 +105,27 @@ jobs:
102
105
 
103
106
  See the example project [component-tests](examples/component-tests/) and the [example-component-test.yml](.github/workflows/example-component-test.yml) workflow for more details.
104
107
 
105
- ### Explicit version
108
+ ### Action version
106
109
 
107
110
  **Best practice:**
108
111
 
109
- Our examples specify the tag of the action to use listing only the major version `@v5`
112
+ Our examples specify using branch [v5](https://github.com/cypress-io/github-action/tree/v5) which is the action's latest major version:
110
113
 
111
114
  ```yml
112
115
  - name: Cypress run
113
116
  uses: cypress-io/github-action@v5
114
117
  ```
115
118
 
116
- When using `cypress-io/github-action@v5` from your workflow file, you automatically will be using the latest [tagged version from this repository](https://github.com/cypress-io/github-action/tags). If you want to precisely control the version of this module, use the full tag version, for example:
119
+ When using `cypress-io/github-action@v5` from your workflow file, you will automatically use the latest [tag](https://github.com/cypress-io/github-action/tags) from branch [v5](https://github.com/cypress-io/github-action/tree/v5).
120
+
121
+ Alternatively, to mitigate unforeseen breaks, bind to a specific [tag](https://github.com/cypress-io/github-action/tags), for example:
117
122
 
118
123
  ```yml
119
124
  - name: Cypress run
120
125
  uses: cypress-io/github-action@v5.1.0
121
126
  ```
122
127
 
123
- By using the full version tag, you will avoid accidentally using a newer version of the action.
128
+ The changes associated with each tag are shown under GitHub's [releases](https://github.com/cypress-io/github-action/releases) list. Refer also to the [Changelog](#changelog) for an overview of major changes.
124
129
 
125
130
  ### Browser
126
131
 
@@ -279,15 +284,15 @@ jobs:
279
284
  - name: Cypress run
280
285
  uses: cypress-io/github-action@v5
281
286
  with:
282
- spec: cypress/integration/spec1.js
287
+ spec: cypress/e2e/spec1.cy.js
283
288
  ```
284
289
 
285
290
  You can pass multiple specs and wild card patterns using multi-line parameter, see [example-config.yml](./.github/workflows/example-config.yml):
286
291
 
287
292
  ```yml
288
293
  spec: |
289
- cypress/integration/spec-a.js
290
- cypress/**/*-b.js
294
+ cypress/e2e/spec-a.cy.js
295
+ cypress/**/*-b.cy.js
291
296
  ```
292
297
 
293
298
  For more information, visit [the Cypress command-line docs](https://on.cypress.io/command-line#cypress-run-env-lt-env-gt).
@@ -372,30 +377,6 @@ jobs:
372
377
  CYPRESS_PROJECT_ID: ${{ secrets.PROJECT_ID }}
373
378
  ```
374
379
 
375
- ### Quiet flag
376
-
377
- You can provide `quiet` flag for cypress run to silence any Cypress specific output from stdout
378
-
379
- ```yml
380
- name: example-quiet
381
- on: push
382
- jobs:
383
- cypress-run:
384
- runs-on: ubuntu-22.04
385
- steps:
386
- - name: Checkout
387
- uses: actions/checkout@v3
388
- # Install NPM dependencies, cache them correctly
389
- # and run all Cypress tests with `quiet` parameter
390
- - name: Cypress run
391
- uses: ./
392
- with:
393
- working-directory: examples/quiet
394
- quiet: true
395
- ```
396
-
397
- [![example-quiet](https://github.com/cypress-io/github-action/workflows/example-quiet/badge.svg?branch=master)](.github/workflows/example-quiet.yml)
398
-
399
380
  ### Tag recordings
400
381
 
401
382
  You can pass a single or multiple tags when recording a run. For example
@@ -409,7 +390,7 @@ jobs:
409
390
  # let's make sure our "app" works on several versions of Node
410
391
  strategy:
411
392
  matrix:
412
- node: [14, 16, 18, 19]
393
+ node: [16, 18, 19, 20]
413
394
  name: E2E on Node v${{ matrix.node }}
414
395
  steps:
415
396
  - name: Setup Node
@@ -503,6 +484,30 @@ jobs:
503
484
  path: cypress/videos
504
485
  ```
505
486
 
487
+ ### Quiet flag
488
+
489
+ You can provide `quiet` flag for cypress run to silence any Cypress specific output from stdout
490
+
491
+ ```yml
492
+ name: example-quiet
493
+ on: push
494
+ jobs:
495
+ cypress-run:
496
+ runs-on: ubuntu-22.04
497
+ steps:
498
+ - name: Checkout
499
+ uses: actions/checkout@v3
500
+ # Install npm dependencies, cache them correctly
501
+ # and run all Cypress tests with `quiet` parameter
502
+ - name: Cypress run
503
+ uses: ./
504
+ with:
505
+ working-directory: examples/quiet
506
+ quiet: true
507
+ ```
508
+
509
+ [![example-quiet](https://github.com/cypress-io/github-action/workflows/example-quiet/badge.svg?branch=master)](.github/workflows/example-quiet.yml)
510
+
506
511
  ### Config
507
512
 
508
513
  Specify [configuration](https://docs.cypress.io/guides/references/configuration.html) values with `config` parameter
@@ -549,9 +554,9 @@ jobs:
549
554
 
550
555
  ### Parallel
551
556
 
552
- **Note:** Cypress parallelization requires [Cypress Cloud](https://on.cypress.io/dashboard-introduction) account.
557
+ **Note:** Cypress parallelization requires a [Cypress Cloud](https://on.cypress.io/dashboard-introduction) account.
553
558
 
554
- You can spin multiple containers running in parallel using `strategy: matrix` argument. Just add more dummy items to the `containers: [1, 2, ...]` array to spin more free or paid containers. Then use `record` and `parallel` parameters to [load balance tests](https://on.cypress.io/parallelization)
559
+ You can spin multiple containers running in parallel using `strategy: matrix` argument. Just add more dummy items to the `containers: [1, 2, ...]` array to spin more free or paid containers. Then use `record` and `parallel` parameters to [load balance tests](https://on.cypress.io/parallelization).
555
560
 
556
561
  ```yml
557
562
  name: Parallel Cypress Tests
@@ -591,9 +596,11 @@ jobs:
591
596
 
592
597
  ![Parallel run](images/parallel.png)
593
598
 
594
- **Warning ⚠️:** Cypress actions use `GITHUB_TOKEN` to get the correct branch and the number of jobs run, making it possible to re-run without the need of pushing an empty commit. If you don't want to use the `GITHUB_TOKEN` you can still run your tests without problem with the only note that Cypress Cloud's API connects parallel jobs into a single logical run using GitHub commit SHA plus workflow name. If you attempt to re-run GitHub checks, Cypress Cloud thinks the run has already ended. In order to truly rerun parallel jobs, push an empty commit with `git commit --allow-empty -m "re-run checks" && git push`. As another work around you can generate and cache a custom build id, read [Adding a unique build number to GitHub Actions](https://medium.com/attest-engineering/adding-a-unique-github-build-identifier-7aa2e83cadca)
599
+ **Warning ⚠️:** Cypress actions use `GITHUB_TOKEN` to get the correct branch and the number of jobs run, making it possible to re-run without the need of pushing an empty commit. If you don't want to use the `GITHUB_TOKEN` you can still run your tests without problem with the only note that Cypress Cloud's API connects parallel jobs into a single logical run using GitHub commit SHA plus workflow name. If you attempt to re-run GitHub checks, Cypress Cloud thinks the run has already ended. In order to truly rerun parallel jobs, push an empty commit with `git commit --allow-empty -m "re-run checks" && git push`. As another work around you can generate and cache a custom build id, read [Adding a unique build number to GitHub Actions](https://medium.com/attest-engineering/adding-a-unique-github-build-identifier-7aa2e83cadca).
600
+
601
+ The Cypress GH Action does not spawn or create any additional containers - it only links the multiple containers spawned using the matrix strategy into a single logical Cypress Cloud run where it splits the specs amongst the machines. See the [Cypress parallelization](https://on.cypress.io/parallelization) guide for the explanation.
595
602
 
596
- The Cypress GH Action does not spawn or create any additional containers - it only links the multiple containers spawned using the matrix strategy into a single logical Cypress Cloud run and into splitting the specs amongst the machines. See the [Cypress parallelization](https://on.cypress.io/parallelization) guide for the explanation.
603
+ During staged rollout of a new GitHub-hosted runner version, GitHub may provide a mixture of current and new image versions used by the container matrix. It is recommended to use a [Docker image](#docker-image) in the parallel job run which avoids any Cypress Cloud errors due to browser major version mismatch from the two different image versions. A [Docker image](#docker-image) is not necessary if testing against the default built-in Electron browser because this browser version is fixed by the Cypress version in use and it is unaffected by any GitHub runner image rollout.
597
604
 
598
605
  ### Component and E2E Testing
599
606
 
@@ -812,7 +819,7 @@ jobs:
812
819
 
813
820
  ### Custom test command
814
821
 
815
- You can overwrite the Cypress run command with your own
822
+ You can overwrite the Cypress run command with your own command.
816
823
 
817
824
  ```yml
818
825
  steps:
@@ -825,6 +832,8 @@ steps:
825
832
  command: npm run e2e:ci
826
833
  ```
827
834
 
835
+ **Caution**: using the action parameter `command` causes multiple other parameters to be ignored including: `auto-cancel-after-failures`, `browser`, `ci-build-id`, `command-prefix`, `component`, `config`, `config-file`, `env`, `group`, `headed`, `parallel`, `project`, `publish-summary`, `quiet`, `record`, `spec` and `tag`.
836
+
828
837
  See [.github/workflows/example-custom-command.yml](.github/workflows/example-custom-command.yml) file.
829
838
 
830
839
  ### Custom build id
@@ -1069,6 +1078,31 @@ See [example-yarn-modern.yml](.github/workflows/example-yarn-modern.yml) for an
1069
1078
 
1070
1079
  [![Yarn Modern example](https://github.com/cypress-io/github-action/workflows/example-yarn-modern/badge.svg?branch=master)](.github/workflows/example-yarn-modern.yml)
1071
1080
 
1081
+ ### Yarn Plug'n'Play
1082
+
1083
+ When using [Yarn Modern](https://yarnpkg.com/) (Yarn 2 and later) with [Plug'n'Play](https://yarnpkg.com/features/pnp) enabled, you will need to use the `command` parameter to run [yarn dlx](https://yarnpkg.com/cli/dlx) instead of [npx](https://docs.npmjs.com/cli/v9/commands/npx).
1084
+
1085
+ ```yaml
1086
+ name: example-yarn-modern-pnp
1087
+ on: push
1088
+ jobs:
1089
+ yarn-classic:
1090
+ runs-on: ubuntu-22.04
1091
+ steps:
1092
+ - name: Checkout
1093
+ uses: actions/checkout@v3
1094
+ - name: Cypress run
1095
+ uses: cypress-io/github-action@v5
1096
+ with:
1097
+ working-directory: examples/yarn-modern-pnp
1098
+ install-command: yarn install
1099
+ command: yarn dlx cypress run
1100
+ ```
1101
+
1102
+ [![Yarn Plug'n'Play example](https://github.com/cypress-io/github-action/actions/workflows/example-yarn-modern-pnp.yml/badge.svg?branch=master)](https://github.com/cypress-io/github-action/actions/workflows/example-yarn-modern-pnp.yml)
1103
+
1104
+ **Caution**: using the action parameter `command` causes multiple other parameters to be ignored. [See `command` section for more information.](#custom-test-command)
1105
+
1072
1106
  ### Yarn workspaces
1073
1107
 
1074
1108
  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)
@@ -1107,7 +1141,7 @@ jobs:
1107
1141
  # let's make sure our "app" works on several versions of Node
1108
1142
  strategy:
1109
1143
  matrix:
1110
- node: [14, 16, 18, 19]
1144
+ node: [16, 18, 19, 20]
1111
1145
  name: E2E on Node v${{ matrix.node }}
1112
1146
  steps:
1113
1147
  - name: Setup Node
@@ -1141,7 +1175,7 @@ jobs:
1141
1175
  runs-on: ubuntu-22.04
1142
1176
  strategy:
1143
1177
  matrix:
1144
- node: [14, 16, 18, 19]
1178
+ node: [16, 18, 19, 20]
1145
1179
  name: E2E on Node v${{ matrix.node }}
1146
1180
  steps:
1147
1181
  - uses: actions/setup-node@v3
@@ -1184,7 +1218,7 @@ See [cypress-gh-action-monorepo](https://github.com/bahmutov/cypress-gh-action-m
1184
1218
 
1185
1219
  ### Custom install
1186
1220
 
1187
- Finally, you might not need this GH Action at all. For example, if you want to split the NPM dependencies installation from the Cypress binary installation, then it makes no sense to use this action. Instead you can install and cache Cypress yourself. See [cypress-gh-action-split-install](https://github.com/bahmutov/cypress-gh-action-split-install) (legacy) for a working example.
1221
+ Finally, you might not need this GH Action at all. For example, if you want to split the npm dependencies installation from the Cypress binary installation, then it makes no sense to use this action. Instead you can install and cache Cypress yourself. See [cypress-gh-action-split-install](https://github.com/bahmutov/cypress-gh-action-split-install) (legacy) for a working example.
1188
1222
 
1189
1223
  ### Install Cypress only
1190
1224
 
@@ -1237,7 +1271,7 @@ See [cypress-gh-action-example](https://github.com/bahmutov/cypress-gh-action-ex
1237
1271
  | [cypress-gh-action-example](https://github.com/bahmutov/cypress-gh-action-example) (legacy) | Uses Yarn, and runs in parallel on several versions of Node, different browsers, and more |
1238
1272
  | [cypress-gh-action-monorepo](https://github.com/bahmutov/cypress-gh-action-monorepo) | Splits install and running tests commands, runs Cypress from sub-folder |
1239
1273
  | [cypress-gh-action-subfolders](https://github.com/bahmutov/cypress-gh-action-subfolders) (legacy) | Has separate folder for Cypress dependencies |
1240
- | [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 |
1274
+ | [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 |
1241
1275
  | [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 |
1242
1276
  | [cypress-examples](https://github.com/bahmutov/cypress-examples) | Shows separate install job from parallel test jobs |
1243
1277
  | [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 |
@@ -1257,16 +1291,6 @@ This action installs local dependencies using lock files. Ensure that exactly on
1257
1291
 
1258
1292
  See section [Yarn Modern](#yarn-modern) for information about using Yarn version 2 and later.
1259
1293
 
1260
- #### Node.js Support
1261
-
1262
- Node.js is required to run this action. The current version `v5` supports:
1263
-
1264
- - **Node.js** 14.x
1265
- - **Node.js** 16.x
1266
- - **Node.js** 18.x and above
1267
-
1268
- and is generally aligned with [Node.js's release schedule](https://github.com/nodejs/Release).
1269
-
1270
1294
  ## Debugging
1271
1295
 
1272
1296
  This action uses the [debug](https://github.com/visionmedia/debug#readme) module to output additional verbose logs. You can see these debug messages by setting the following environment variable:
@@ -1318,10 +1342,6 @@ pinging url https://example.cypress.io for 30 seconds
1318
1342
  ::debug::pinging https://example.cypress.io has finished ok
1319
1343
  ```
1320
1344
 
1321
- ## Development
1322
-
1323
- Read [DEVELOPMENT.md](DEVELOPMENT.md)
1324
-
1325
1345
  ## More information
1326
1346
 
1327
1347
  - Read our blog post [Drastically Simplify Testing on CI with Cypress GitHub Action](https://www.cypress.io/blog/2019/11/20/drastically-simplify-your-testing-with-cypress-github-action/)
@@ -1456,24 +1476,49 @@ jobs:
1456
1476
  publish-summary: false
1457
1477
  ```
1458
1478
 
1479
+ ## Node.js Support
1480
+
1481
+ Node.js is required to run this action. The current version `v5` supports:
1482
+
1483
+ - **Node.js** 16.x
1484
+ - **Node.js** 18.x and above
1485
+
1486
+ and is generally aligned with [Node.js's release schedule](https://github.com/nodejs/Release).
1487
+
1459
1488
  ## Changelog
1460
1489
 
1461
1490
  See [Releases](https://github.com/cypress-io/github-action/releases) for full details of changes.
1462
1491
 
1463
- | Version | Changes |
1464
- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
1465
- | v5 | Examples and workflows additionally use Node.js 18. Use of the end-of-life Node.js version 12 in examples and workflows is removed. |
1466
- | v4.2.0 | Support for pnpm added. |
1467
- | v4 | Support for Cypress 10 and later versions is added. |
1468
- | v3 | Action runs under Node.js 16 instead of Node.js 12. |
1469
- | v2 | Cypress runs using the [NPM module API](https://docs.cypress.io/guides/guides/module-api) instead of being started via the command line. |
1470
- | v1 | *This version is no longer runnable in GitHub due to security changes.* |
1492
+ | Version | Changes |
1493
+ | ------- | ------------------------------------------------------------------------------------------------------------------------------------ |
1494
+ | v5.6.2 | Examples add Node.js 20. End of support and removal of Node.js 14 examples. |
1495
+ | v5.2.0 | Examples add Node.js 19. |
1496
+ | v5.0.0 | Examples add Node.js 18 and remove Node.js 12. |
1497
+ | v4.2.2 | Dependency on GitHub `set-output` workflow command removed. |
1498
+ | v4.2.0 | Support for `pnpm` added. |
1499
+ | v4.0.0 | Support for Cypress 10 and later versions added. |
1500
+ | v3 | Action runs under Node.js 16 instead of Node.js 12. |
1501
+ | v2 | Cypress runs using the [Module API](https://docs.cypress.io/guides/guides/module-api) instead of being started via the command line. |
1502
+ | v1 | *This version is no longer runnable in GitHub due to security changes.* |
1471
1503
 
1472
1504
  *Note: [GitHub announced](https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/) their plan to disable `save-state` and `set-output` commands by May 31, 2023. This will prevent [cypress-io/github-action](https://github.com/cypress-io/github-action) version [v4.2.1](https://github.com/cypress-io/github-action/releases/tag/v4.2.1), and earlier, running after this date since they use `set-output`. Affected users should update to using `v5` of the [cypress-io/github-action](https://github.com/cypress-io/github-action) action before the deadline.*
1473
1505
 
1506
+ ## Contributing
1507
+
1508
+ Please see our [Contributing Guideline](./CONTRIBUTING.md) which explains how to contribute fixes or features to the repo and how to test.
1509
+
1474
1510
  ## License
1475
1511
 
1476
- [MIT License](./LICENSE.md)
1512
+ [![license][license-badge]][license-file]
1513
+
1514
+ This project is licensed under the terms of the [MIT license][license-file].
1477
1515
 
1516
+ <!-- badge links follow -->
1517
+ [ci-badge]: https://github.com/cypress-io/github-action/workflows/main/badge.svg?branch=master
1518
+ [ci-workflow]: https://github.com/cypress-io/github-action/actions/workflows/main.yml
1519
+ [cloud-badge]: https://img.shields.io/endpoint?url=https://cloud.cypress.io/badge/simple/3tb7jn/master&style=flat&logo=cypress
1520
+ [cloud-project]: https://cloud.cypress.io/projects/3tb7jn/runs
1478
1521
  [renovate-badge]: https://img.shields.io/badge/renovate-app-blue.svg
1479
1522
  [renovate-bot]: https://github.com/renovatebot
1523
+ [license-badge]: https://img.shields.io/badge/license-MIT-green.svg
1524
+ [license-file]: ./LICENSE.md
package/action.yml CHANGED
@@ -1,7 +1,7 @@
1
1
  # https://help.github.com/en/actions/automating-your-workflow-with-github-actions/metadata-syntax-for-github-actions
2
2
  name: 'Cypress.io'
3
- description: 'GitHub Action for running Cypress end-to-end tests'
4
- author: 'Gleb Bahmutov'
3
+ description: 'GitHub Action for running Cypress end-to-end and component tests'
4
+ author: 'Cypress-io'
5
5
  inputs:
6
6
  record:
7
7
  description: 'Sends test results to Cypress Dashboard'
package/dist/index.js CHANGED
@@ -75008,10 +75008,6 @@ const runTests = async () => {
75008
75008
  quiet: getInputBool('quiet'),
75009
75009
  component: getInputBool('component')
75010
75010
  }
75011
- const cypressModulePath =
75012
- require.resolve('cypress', { paths: [workingDirectory] }) ||
75013
- 'cypress'
75014
- const cypress = require(cypressModulePath)
75015
75011
  const runTests = getInputBool('runTests', true)
75016
75012
  const spec = getSpecsList()
75017
75013
 
@@ -75033,6 +75029,11 @@ const runTests = async () => {
75033
75029
  return runTestsUsingCommandLine()
75034
75030
  }
75035
75031
 
75032
+ const cypressModulePath =
75033
+ require.resolve('cypress', { paths: [workingDirectory] }) ||
75034
+ 'cypress'
75035
+ const cypress = require(cypressModulePath)
75036
+
75036
75037
  debug('Running Cypress tests using NPM module API')
75037
75038
  debug(`requiring cypress dependency, cwd is ${process.cwd()}`)
75038
75039
  debug(`working directory ${workingDirectory}`)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cypress/github-action",
3
- "version": "5.6.1",
3
+ "version": "5.7.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",
@@ -25,7 +25,7 @@
25
25
  "actions",
26
26
  "cypress-io"
27
27
  ],
28
- "author": "Gleb Bahmutov <gleb@cypress.io>",
28
+ "author": "Cypress-io",
29
29
  "license": "MIT",
30
30
  "bugs": {
31
31
  "url": "https://github.com/cypress-io/github-action/issues"
@@ -46,10 +46,10 @@
46
46
  "supports-color": "9.3.1"
47
47
  },
48
48
  "devDependencies": {
49
- "@types/node": "18.15.10",
49
+ "@types/node": "18.16.1",
50
50
  "@vercel/ncc": "0.36.1",
51
51
  "husky": "8.0.3",
52
- "markdown-link-check": "3.11.0",
52
+ "markdown-link-check": "3.11.1",
53
53
  "prettier": "2.8.4"
54
54
  },
55
55
  "publishConfig": {