@cypress/github-action 6.7.5 → 6.7.7
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 +31 -21
- package/dist/index.js +24311 -983
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -63,14 +63,12 @@
|
|
|
63
63
|
- Suppress [job summary](#suppress-job-summary)
|
|
64
64
|
- [More examples](#more-examples)
|
|
65
65
|
|
|
66
|
-
Examples contained in this repository, based on current Cypress versions, can be found in the [examples](./examples) directory.
|
|
66
|
+
Examples contained in this repository, based on current Cypress versions, can be found in the [examples](./examples) directory.
|
|
67
67
|
|
|
68
68
|
Live examples, such as [example-basic.yml](.github/workflows/example-basic.yml) are shown together with a status badge. Click on the status badge to read the source code of the workflow, for example
|
|
69
69
|
|
|
70
70
|
[](.github/workflows/example-basic.yml)
|
|
71
71
|
|
|
72
|
-
Older **external** examples based on a [Legacy Configuration](https://on.cypress.io/guides/references/legacy-configuration) for Cypress `9` and earlier can be found in the [README](https://github.com/cypress-io/github-action/blob/v5/README.md) for version `v5`.
|
|
73
|
-
|
|
74
72
|
**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).
|
|
75
73
|
|
|
76
74
|
### End-to-End Testing
|
|
@@ -531,7 +529,7 @@ jobs:
|
|
|
531
529
|
# let's make sure our "app" works on several versions of Node
|
|
532
530
|
strategy:
|
|
533
531
|
matrix:
|
|
534
|
-
node: [18, 20, 22]
|
|
532
|
+
node: [18, 20, 22, 23]
|
|
535
533
|
name: E2E on Node v${{ matrix.node }}
|
|
536
534
|
steps:
|
|
537
535
|
- name: Setup Node
|
|
@@ -561,7 +559,7 @@ You can pass multiple tags using commas like `tag: node-18,nightly,staging`.
|
|
|
561
559
|
|
|
562
560
|
### Specify auto cancel after failures
|
|
563
561
|
|
|
564
|
-
Specify the number of failed tests that will cancel a run when using the [Cypress Cloud Auto Cancellation](https://docs.cypress.io/
|
|
562
|
+
Specify the number of failed tests that will cancel a run when using the [Cypress Cloud Auto Cancellation](https://docs.cypress.io/cloud/features/smart-orchestration/run-cancellation) feature.
|
|
565
563
|
|
|
566
564
|
This feature requires Cypress 12.6.0 or later and a [Cypress Cloud Business or Enterprise](https://www.cypress.io/cloud/) account.
|
|
567
565
|
|
|
@@ -588,7 +586,7 @@ jobs:
|
|
|
588
586
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
589
587
|
```
|
|
590
588
|
|
|
591
|
-
See [Auto Cancellation](https://docs.cypress.io/
|
|
589
|
+
See [Auto Cancellation](https://docs.cypress.io/cloud/features/smart-orchestration/run-cancellation) for more information.
|
|
592
590
|
|
|
593
591
|
### Artifacts
|
|
594
592
|
|
|
@@ -733,13 +731,13 @@ jobs:
|
|
|
733
731
|
|
|
734
732
|

|
|
735
733
|
|
|
736
|
-
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 Cloud Smart Orchestration](https://
|
|
734
|
+
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 Cloud Smart Orchestration](https://docs.cypress.io/cloud/features/smart-orchestration/overview/) guide for a detailed explanation.
|
|
737
735
|
|
|
738
736
|
If you use the GitHub Actions facility for [Re-running workflows and jobs](https://docs.github.com/en/actions/managing-workflow-runs/re-running-workflows-and-jobs), note that [Re-running failed jobs in a workflow](https://docs.github.com/en/actions/managing-workflow-runs/re-running-workflows-and-jobs?tool=webui#re-running-failed-jobs-in-a-workflow) is not suited for use with parallel recording into Cypress Cloud. Re-running failed jobs in this situation does not simply re-run failed Cypress tests. Instead it re-runs **all** Cypress tests, load-balanced over the containers with failed jobs.
|
|
739
737
|
|
|
740
|
-
To optimize runs when there are failing tests present, refer to optional [Cypress Cloud Smart Orchestration](https://
|
|
741
|
-
- [Spec Prioritization](https://
|
|
742
|
-
- [
|
|
738
|
+
To optimize runs when there are failing tests present, refer to optional [Cypress Cloud Smart Orchestration](https://docs.cypress.io/cloud/features/smart-orchestration/overview/) Premium features:
|
|
739
|
+
- [Spec Prioritization](https://docs.cypress.io/cloud/features/smart-orchestration/spec-prioritization)
|
|
740
|
+
- [Auto Cancellation](https://docs.cypress.io/guides/cloud/smart-orchestration/run-cancellation). See also [Specify auto cancel after failures](#specify-auto-cancel-after-failures) for details of how to set this option in a Cypress GH Action workflow.
|
|
743
741
|
|
|
744
742
|
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.
|
|
745
743
|
|
|
@@ -1292,7 +1290,7 @@ jobs:
|
|
|
1292
1290
|
# let's make sure our "app" works on several versions of Node
|
|
1293
1291
|
strategy:
|
|
1294
1292
|
matrix:
|
|
1295
|
-
node: [18, 20, 22]
|
|
1293
|
+
node: [18, 20, 22, 23]
|
|
1296
1294
|
name: E2E on Node v${{ matrix.node }}
|
|
1297
1295
|
steps:
|
|
1298
1296
|
- name: Setup Node
|
|
@@ -1326,7 +1324,7 @@ jobs:
|
|
|
1326
1324
|
runs-on: ubuntu-22.04
|
|
1327
1325
|
strategy:
|
|
1328
1326
|
matrix:
|
|
1329
|
-
node: [18, 20, 22]
|
|
1327
|
+
node: [18, 20, 22, 23]
|
|
1330
1328
|
name: E2E on Node v${{ matrix.node }}
|
|
1331
1329
|
steps:
|
|
1332
1330
|
- uses: actions/setup-node@v4
|
|
@@ -1439,7 +1437,7 @@ See section [Yarn Modern](#yarn-modern) for information about using Yarn version
|
|
|
1439
1437
|
|
|
1440
1438
|
## Debugging
|
|
1441
1439
|
|
|
1442
|
-
This action uses the [debug](https://github.com/
|
|
1440
|
+
This action uses the [debug](https://github.com/debug-js/debug#readme) module to output additional verbose logs. You can see these debug messages by setting the following environment variable:
|
|
1443
1441
|
|
|
1444
1442
|
```yml
|
|
1445
1443
|
DEBUG: @cypress/github-action
|
|
@@ -1460,7 +1458,7 @@ To collect more verbose GitHub Action logs you can set a GitHub secret or variab
|
|
|
1460
1458
|
|
|
1461
1459
|
### Logs from the test runner
|
|
1462
1460
|
|
|
1463
|
-
To see
|
|
1461
|
+
To see all [Cypress debug logs](http://on.cypress.io/troubleshooting#Print-DEBUG-logs), add the environment variable `DEBUG` to the workflow using the value `cypress:*`:
|
|
1464
1462
|
|
|
1465
1463
|
```yml
|
|
1466
1464
|
- name: Cypress tests with debug logs
|
|
@@ -1469,6 +1467,8 @@ To see the [Cypress debug logs](http://on.cypress.io/troubleshooting#Print-DEBUG
|
|
|
1469
1467
|
DEBUG: 'cypress:*'
|
|
1470
1468
|
```
|
|
1471
1469
|
|
|
1470
|
+
Replace the value `cypress:*` with specific [Cypress log sources](https://on.cypress.io/troubleshooting#Log-sources) to filter debug log output.
|
|
1471
|
+
|
|
1472
1472
|
### Debugging waiting for URL to respond
|
|
1473
1473
|
|
|
1474
1474
|
If you have a problem with `wait-on` not working, you can check the [src/ping.js](src/ping.js) logic from the local machine.
|
|
@@ -1478,16 +1478,26 @@ If you have a problem with `wait-on` not working, you can check the [src/ping.js
|
|
|
1478
1478
|
- start your server
|
|
1479
1479
|
- from another terminal call the `ping` yourself to validate the server is responding:
|
|
1480
1480
|
|
|
1481
|
-
```
|
|
1482
|
-
|
|
1481
|
+
```shell
|
|
1482
|
+
node src/ping-cli.js <url>
|
|
1483
1483
|
```
|
|
1484
1484
|
|
|
1485
|
-
For example
|
|
1485
|
+
For example:
|
|
1486
1486
|
|
|
1487
|
-
```
|
|
1487
|
+
```text
|
|
1488
1488
|
$ node src/ping-cli.js https://example.cypress.io
|
|
1489
1489
|
pinging url https://example.cypress.io for 30 seconds
|
|
1490
|
-
|
|
1490
|
+
```
|
|
1491
|
+
|
|
1492
|
+
You can also enable debug logs by setting the environment variable `DEBUG='@cypress/github-action'`, for example:
|
|
1493
|
+
|
|
1494
|
+
```text
|
|
1495
|
+
$ DEBUG='@cypress/github-action' node src/ping-cli.js https://example.cypress.io
|
|
1496
|
+
pinging url https://example.cypress.io for 30 seconds
|
|
1497
|
+
@cypress/github-action total ping timeout 60000 +0ms
|
|
1498
|
+
@cypress/github-action individual ping timeout 30000ms +0ms
|
|
1499
|
+
@cypress/github-action retries limit 2 +0ms
|
|
1500
|
+
@cypress/github-action pinging https://example.cypress.io has finished ok after 185ms +185ms
|
|
1491
1501
|
```
|
|
1492
1502
|
|
|
1493
1503
|
## More information
|
|
@@ -1655,7 +1665,7 @@ jobs:
|
|
|
1655
1665
|
|
|
1656
1666
|
Node.js is required to run this action. The recommended version `v6` supports:
|
|
1657
1667
|
|
|
1658
|
-
- **Node.js** 18.x, 20.x and
|
|
1668
|
+
- **Node.js** 18.x, 20.x, 22.x and 23.x
|
|
1659
1669
|
|
|
1660
1670
|
and is generally aligned with [Node.js's release schedule](https://github.com/nodejs/Release).
|
|
1661
1671
|
|
|
@@ -1673,7 +1683,7 @@ View the [CHANGELOG](./CHANGELOG.md) document for an overview of version changes
|
|
|
1673
1683
|
|
|
1674
1684
|
## Compatibility
|
|
1675
1685
|
|
|
1676
|
-
- `github-action@v6` is the current recommended version
|
|
1686
|
+
- `github-action@v6` is the current recommended version, uses `node20` and is compatible with Cypress `10` and above.
|
|
1677
1687
|
- `github-action` versions `v1` to `v5` are unsupported: they rely on Node.js `12` and `16` in End-of-life status.
|
|
1678
1688
|
|
|
1679
1689
|
## Contributing
|