@cypress/github-action 6.1.0 → 6.2.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.
Files changed (2) hide show
  1. package/README.md +11 -46
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -57,13 +57,13 @@
57
57
  - Suppress [test summary](#suppress-test-summary)
58
58
  - [More examples](#more-examples)
59
59
 
60
- 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) which use Cypress `9.7.0` are no longer maintained. They can be referred to in the [examples/v9](https://github.com/cypress-io/github-action/tree/v5/examples/v9) directory of the [v5](https://github.com/cypress-io/github-action/tree/v5/) branch.
60
+ Examples contained in this repository, based on current Cypress versions, can be found in the [examples](./examples) directory. Examples for [Legacy Configuration](https://on.cypress.io/guides/references/legacy-configuration), which use Cypress `9.7.0`, are no longer maintained. They can be referred to in the [examples/v9](https://github.com/cypress-io/github-action/tree/v5/examples/v9) directory of the [v5](https://github.com/cypress-io/github-action/tree/v5/) branch.
61
61
 
62
62
  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
63
63
 
64
64
  [![End-to-End example](https://github.com/cypress-io/github-action/workflows/example-basic/badge.svg?branch=master)](.github/workflows/example-basic.yml)
65
65
 
66
- 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.
66
+ 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`.
67
67
 
68
68
  **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).
69
69
 
@@ -920,24 +920,9 @@ See the [example-custom-ci-build-id.yml](.github/workflows/example-custom-ci-bui
920
920
 
921
921
  ### Working directory
922
922
 
923
- In a monorepo, the end-to-end or component test might be placed in a different sub-folder from the application itself.
923
+ In a monorepo, the end-to-end or component test might be placed in a different sub-folder from the application itself. This sub-folder is the Cypress "working directory" which you can specify using the `working-directory` parameter.
924
924
 
925
- Using a [Cypress legacy configuration](https://docs.cypress.io/guides/references/legacy-configuration) (Version 9 or earlier) the structure could look like this:
926
-
927
- ```text
928
- repo/
929
- app/
930
- app-test/
931
- cypress/
932
- fixtures/
933
- integration/
934
- plugins/
935
- support/
936
- cypress.json
937
- package.json
938
- ```
939
-
940
- For End-to-End testing using a [Cypress configuration](https://docs.cypress.io/guides/references/configuration) for Version 10 and later, the structure could look like this :
925
+ In the following example of a directory layout for end-to-end testing, the Cypress working directory is `app-test`. The working directory contains the Cypress tests and a package manager lock file:
941
926
 
942
927
  ```text
943
928
  repo/
@@ -949,23 +934,10 @@ repo/
949
934
  support/
950
935
  cypress.config.js
951
936
  package.json
937
+ package-lock.json
952
938
  ```
953
939
 
954
- Similarly for Component Testing with a [Cypress configuration](https://docs.cypress.io/guides/references/configuration) for Version 10 and later, the structure could look like this:
955
-
956
- ```text
957
- repo/
958
- app/
959
- app-test/
960
- cypress/
961
- component/
962
- fixtures/
963
- support/
964
- cypress.config.js
965
- package.json
966
- ```
967
-
968
- You can specify the `app-test` working directory when running Cypress tests using the `working-directory` parameter
940
+ We use `working-directory: app-test` to match the above example directory structure:
969
941
 
970
942
  ```yml
971
943
  on: push
@@ -980,7 +952,9 @@ jobs:
980
952
  working-directory: app-test
981
953
  ```
982
954
 
983
- See [example-basic.yml](.github/workflows/example-basic.yml) for an End-to-End test example and [example-component-test.yml](.github/workflows/example-component-test.yml) for a Component test example, using the parameter `working-directory`.
955
+ See the Cypress documentation [Folder structure](https://on.cypress.io/guides/core-concepts/writing-and-organizing-tests#Folder-Structure) section for examples of standard directory layouts, covering end-to-end testing and component testing with both JavaScript and TypeScript options.
956
+
957
+ Each of the examples in this monorepo is separated from other examples by using different working directories. See [example-basic.yml](.github/workflows/example-basic.yml) for one end-to-end test example using the parameter `working-directory` and [example-component-test.yml](.github/workflows/example-component-test.yml) for a component test example.
984
958
 
985
959
  ### Subfolders
986
960
 
@@ -1023,8 +997,6 @@ jobs:
1023
997
  working-directory: e2e
1024
998
  ```
1025
999
 
1026
- See [cypress-gh-action-subfolders](https://github.com/bahmutov/cypress-gh-action-subfolders) (legacy) for example.
1027
-
1028
1000
  ### pnpm
1029
1001
 
1030
1002
  The package manager `pnpm` is not pre-installed in [GitHub Actions runner images](https://github.com/actions/runner-images) (unlike `npm` and `yarn`): to install `pnpm` include [pnpm/action-setup](https://github.com/pnpm/action-setup) in your workflow. If the action finds a `pnpm-lock.yaml` file, it uses the [pnpm](https://pnpm.io/cli/install) command `pnpm install --frozen-lockfile` by default to install dependencies.
@@ -1041,7 +1013,7 @@ jobs:
1041
1013
  - name: Install pnpm
1042
1014
  uses: pnpm/action-setup@v2
1043
1015
  with:
1044
- version: 7
1016
+ version: 8
1045
1017
  - name: Cypress run
1046
1018
  uses: cypress-io/github-action@v5
1047
1019
  with:
@@ -1240,7 +1212,7 @@ See [cypress-gh-action-monorepo](https://github.com/bahmutov/cypress-gh-action-m
1240
1212
 
1241
1213
  ### Custom install
1242
1214
 
1243
- 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.
1215
+ 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.
1244
1216
 
1245
1217
  ### Install Cypress only
1246
1218
 
@@ -1280,8 +1252,6 @@ jobs:
1280
1252
  timeout-minutes: 5
1281
1253
  ```
1282
1254
 
1283
- See [cypress-gh-action-example](https://github.com/bahmutov/cypress-gh-action-example) (legacy).
1284
-
1285
1255
  ### More examples
1286
1256
 
1287
1257
  <!-- prettier-ignore-start -->
@@ -1289,12 +1259,7 @@ See [cypress-gh-action-example](https://github.com/bahmutov/cypress-gh-action-ex
1289
1259
  | ------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
1290
1260
  | [cypress-io/cypress-example-kitchensink](https://github.com/cypress-io/cypress-example-kitchensink) | Runs every API command in Cypress using various CI platforms including GitHub Actions |
1291
1261
  | [cypress-io/cypress-realworld-app](https://github.com/cypress-io/cypress-realworld-app) | A real-world example payment application. Uses GitHub Actions and CircleCI. |
1292
- | [cypress-gh-action-small-example](https://github.com/bahmutov/cypress-gh-action-small-example) (legacy) | Runs tests and records them on Cypress Cloud |
1293
- | [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 |
1294
1262
  | [cypress-gh-action-monorepo](https://github.com/bahmutov/cypress-gh-action-monorepo) | Splits install and running tests commands, runs Cypress from sub-folder |
1295
- | [cypress-gh-action-subfolders](https://github.com/bahmutov/cypress-gh-action-subfolders) (legacy) | Has separate folder for Cypress dependencies |
1296
- | [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 |
1297
- | [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 |
1298
1263
  | [cypress-examples](https://github.com/bahmutov/cypress-examples) | Shows separate install job from parallel test jobs |
1299
1264
  | [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 |
1300
1265
  <!-- prettier-ignore-end -->
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cypress/github-action",
3
- "version": "6.1.0",
3
+ "version": "6.2.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",
@@ -46,7 +46,7 @@
46
46
  "supports-color": "9.3.1"
47
47
  },
48
48
  "devDependencies": {
49
- "@types/node": "20.5.0",
49
+ "@types/node": "20.5.7",
50
50
  "@vercel/ncc": "0.36.1",
51
51
  "husky": "8.0.3",
52
52
  "markdown-link-check": "3.11.1",