|
44 | 44 | - [run tests nightly](#nightly-tests) or on any schedule
|
45 | 45 | - [more examples](#more-examples)
|
46 | 46 |
|
| 47 | +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. |
| 48 | + |
| 49 | +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. |
| 50 | + |
47 | 51 | ### Basic
|
48 | 52 |
|
49 | 53 | ```yml
|
@@ -437,7 +441,7 @@ See [Auto Cancellation](https://docs.cypress.io/guides/cloud/smart-orchestration
|
437 | 441 |
|
438 | 442 | ### Artifacts
|
439 | 443 |
|
440 |
| -If you don't record the test run on Cypress Cloud, you can still store generated videos and screenshots as CI artifacts. See [cypress-gh-action-example](https://github.com/bahmutov/cypress-gh-action-example) and the workflow example below |
| 444 | +If you don't record the test run on Cypress Cloud, you can still store generated videos and screenshots as CI artifacts. See [cypress-gh-action-example](https://github.com/bahmutov/cypress-gh-action-example) (legacy) and the workflow example below |
441 | 445 |
|
442 | 446 | ```yml
|
443 | 447 | name: Artifacts
|
@@ -963,7 +967,7 @@ jobs:
|
963 | 967 | working-directory: e2e
|
964 | 968 | ```
|
965 | 969 |
|
966 |
| -See [cypress-gh-action-subfolders](https://github.com/bahmutov/cypress-gh-action-subfolders) for example. |
| 970 | +See [cypress-gh-action-subfolders](https://github.com/bahmutov/cypress-gh-action-subfolders) (legacy) for example. |
967 | 971 |
|
968 | 972 | ### Yarn workspaces
|
969 | 973 |
|
@@ -1082,7 +1086,7 @@ See [cypress-gh-action-monorepo](https://github.com/bahmutov/cypress-gh-action-m
|
1082 | 1086 |
|
1083 | 1087 | ### Custom install
|
1084 | 1088 |
|
1085 |
| -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) for working example. |
| 1089 | +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. |
1086 | 1090 |
|
1087 | 1091 | ### Install Cypress only
|
1088 | 1092 |
|
@@ -1124,23 +1128,23 @@ jobs:
|
1124 | 1128 | timeout-minutes: 5
|
1125 | 1129 | ```
|
1126 | 1130 |
|
1127 |
| -See [cypress-gh-action-example](https://github.com/bahmutov/cypress-gh-action-example) |
| 1131 | +See [cypress-gh-action-example](https://github.com/bahmutov/cypress-gh-action-example) (legacy). |
1128 | 1132 |
|
1129 | 1133 | ### More examples
|
1130 | 1134 |
|
1131 | 1135 | <!-- prettier-ignore-start -->
|
1132 |
| -Name | Description |
1133 |
| ---- | --- |
1134 |
| -[cypress-gh-action-small-example](https://github.com/bahmutov/cypress-gh-action-small-example) | Runs tests and records them on Cypress Cloud |
1135 |
| -[cypress-gh-action-example](https://github.com/bahmutov/cypress-gh-action-example) | uses Yarn, and runs in parallel on several versions of Node, different browsers, and more. |
1136 |
| -[cypress-gh-action-monorepo](https://github.com/bahmutov/cypress-gh-action-monorepo) | splits install and running tests commands, runs Cypress from sub-folder |
1137 |
| -[cypress-gh-action-subfolders](https://github.com/bahmutov/cypress-gh-action-subfolders) | separate folder for Cypress dependencies |
1138 |
| -[cypress-gh-action-split-install](https://github.com/bahmutov/cypress-gh-action-split-install) | only install NPM dependencies, then install and cache Cypress binary yourself |
1139 |
| -[test-personal-site](https://github.com/bahmutov/test-personal-site) | Testing an external website every night and by manually clicking a button. |
1140 |
| -[cypress-gh-action-changed-files](https://github.com/bahmutov/cypress-gh-action-changed-files) | Shows how to run different Cypress projects depending on changed files |
1141 |
| -[cypress-examples](https://github.com/bahmutov/cypress-examples) | Shows separate install job from parallel test jobs |
1142 |
| -[cypress-gh-action-split-jobs](https://github.com/bahmutov/cypress-gh-action-split-jobs) | Shows a separate install job with the build step, and another job that runs the tests |
1143 |
| -[cypress-react-component-example](https://github.com/bahmutov/cypress-react-component-example) | Run E2E and component tests using this action |
| 1136 | +| Name | Description | |
| 1137 | +| ------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | |
| 1138 | +| [cypress-gh-action-small-example](https://github.com/bahmutov/cypress-gh-action-small-example) (legacy) | Runs tests and records them on Cypress Cloud | |
| 1139 | +| [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 | |
| 1140 | +| [cypress-gh-action-monorepo](https://github.com/bahmutov/cypress-gh-action-monorepo) | Splits install and running tests commands, runs Cypress from sub-folder | |
| 1141 | +| [cypress-gh-action-subfolders](https://github.com/bahmutov/cypress-gh-action-subfolders) (legacy) | Has separate folder for Cypress dependencies | |
| 1142 | +| [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 | |
| 1143 | +| [test-personal-site](https://github.com/bahmutov/test-personal-site) (legacy) | Testing an external website every night and by manually clicking a button | |
| 1144 | +| [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 | |
| 1145 | +| [cypress-examples](https://github.com/bahmutov/cypress-examples) | Shows separate install job from parallel test jobs | |
| 1146 | +| [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 | |
| 1147 | +| [cypress-react-component-example](https://github.com/bahmutov/cypress-react-component-example) (legacy) | Run E2E and component tests using this action | |
1144 | 1148 | <!-- prettier-ignore-end -->
|
1145 | 1149 |
|
1146 | 1150 | ## Notes
|
@@ -1256,7 +1260,7 @@ This GH Action sets an output `dashboardUrl` if the run was recorded on [Cypress
|
1256 | 1260 |
|
1257 | 1261 | ### Docker image
|
1258 | 1262 |
|
1259 |
| -If your repository does not have `package.json` or `yarn.json` (maybe it contains a static site and does not need any dependencies), you can run Cypress tests using `cypress/included:...` [Cypress Docker images](https://github.com/cypress-io/cypress-docker-images/tree/master/included). In that case you don't even need this GH Action, instead use the Docker container and write `cypress run` command like this example from [cypress-gh-action-included](https://github.com/bahmutov/cypress-gh-action-included) |
| 1263 | +If your repository does not have `package.json` or `yarn.json` (maybe it contains a static site and does not need any dependencies), you can run Cypress tests using `cypress/included:...` [Cypress Docker images](https://github.com/cypress-io/cypress-docker-images/tree/master/included). In that case you don't even need this GH Action, instead use the Docker container and write `cypress run` command like this example from [cypress-gh-action-included](https://github.com/bahmutov/cypress-gh-action-included) (legacy) |
1260 | 1264 |
|
1261 | 1265 | ```yml
|
1262 | 1266 | name: included
|
|
0 commit comments