@cypress/github-action 6.1.0 → 6.3.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 +74 -109
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
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
- Placing `use: cypress-io/github-action@v5` into a GitHub Action workflow gives you a simple way to run Cypress. The action takes the project's npm, pnpm or Yarn package manager lock file, installs dependencies and caches these dependencies for future use. It then proceeds to run Cypress end-to-end tests with the built-in Electron browser and provides a test summary after completion.
5
+ Placing `use: cypress-io/github-action@v6` into a GitHub Action workflow gives you a simple way to run Cypress. The action takes the project's npm, pnpm or Yarn package manager lock file, installs dependencies and caches these dependencies for future use. It then proceeds to run Cypress end-to-end tests with the built-in Electron browser and provides a test summary after completion.
6
6
 
7
7
  If you are testing against a running server like the [Cypress Kitchen Sink showcase example](https://example.cypress.io/) on https://example.cypress.io/ no other parameters are necessary. In other cases where you need to fire up a development server, you can add the [start](#start-server) parameter to the workflow. Browse through the examples to find other useful parameters.
8
8
 
@@ -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
 
@@ -81,7 +81,7 @@ jobs:
81
81
  # Install npm dependencies, cache them correctly
82
82
  # and run all Cypress tests
83
83
  - name: Cypress run
84
- uses: cypress-io/github-action@v5
84
+ uses: cypress-io/github-action@v6
85
85
  ```
86
86
 
87
87
  [![End-to-End example](https://github.com/cypress-io/github-action/workflows/example-basic/badge.svg?branch=master)](.github/workflows/example-basic.yml)
@@ -104,7 +104,7 @@ jobs:
104
104
  - name: Checkout
105
105
  uses: actions/checkout@v3
106
106
  - name: Cypress run
107
- uses: cypress-io/github-action@v5
107
+ uses: cypress-io/github-action@v6
108
108
  with:
109
109
  component: true
110
110
  ```
@@ -121,16 +121,16 @@ Our examples specify using branch [v5](https://github.com/cypress-io/github-acti
121
121
 
122
122
  ```yml
123
123
  - name: Cypress run
124
- uses: cypress-io/github-action@v5
124
+ uses: cypress-io/github-action@v6
125
125
  ```
126
126
 
127
- 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).
127
+ When using `cypress-io/github-action@v6` 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).
128
128
 
129
129
  Alternatively, to mitigate unforeseen breaks, bind to a specific [tag](https://github.com/cypress-io/github-action/tags), for example:
130
130
 
131
131
  ```yml
132
132
  - name: Cypress run
133
- uses: cypress-io/github-action@v5.1.0
133
+ uses: cypress-io/github-action@v6.1.0
134
134
  ```
135
135
 
136
136
  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.
@@ -150,7 +150,7 @@ jobs:
150
150
  name: E2E on Chrome
151
151
  steps:
152
152
  - uses: actions/checkout@v3
153
- - uses: cypress-io/github-action@v5
153
+ - uses: cypress-io/github-action@v6
154
154
  with:
155
155
  browser: chrome
156
156
  ```
@@ -168,7 +168,7 @@ jobs:
168
168
  name: E2E on Firefox
169
169
  steps:
170
170
  - uses: actions/checkout@v3
171
- - uses: cypress-io/github-action@v5
171
+ - uses: cypress-io/github-action@v6
172
172
  with:
173
173
  browser: firefox
174
174
  ```
@@ -186,7 +186,7 @@ jobs:
186
186
  name: E2E on Edge
187
187
  steps:
188
188
  - uses: actions/checkout@v3
189
- - uses: cypress-io/github-action@v5
189
+ - uses: cypress-io/github-action@v6
190
190
  with:
191
191
  browser: edge
192
192
  ```
@@ -205,7 +205,7 @@ jobs:
205
205
  runs-on: ubuntu-22.04
206
206
  steps:
207
207
  - uses: actions/checkout@v3
208
- - uses: cypress-io/github-action@v5
208
+ - uses: cypress-io/github-action@v6
209
209
  with:
210
210
  browser: chrome
211
211
  headed: true
@@ -228,7 +228,7 @@ jobs:
228
228
  options: --user 1001
229
229
  steps:
230
230
  - uses: actions/checkout@v3
231
- - uses: cypress-io/github-action@v5
231
+ - uses: cypress-io/github-action@v6
232
232
  with:
233
233
  browser: chrome
234
234
  ```
@@ -254,7 +254,7 @@ jobs:
254
254
  uses: actions/checkout@v3
255
255
 
256
256
  - name: Cypress run with env
257
- uses: cypress-io/github-action@v5
257
+ uses: cypress-io/github-action@v6
258
258
  with:
259
259
  env: host=api.dev.local,port=4222
260
260
  ```
@@ -272,7 +272,7 @@ jobs:
272
272
  uses: actions/checkout@v3
273
273
 
274
274
  - name: Cypress run with env
275
- uses: cypress-io/github-action@v5
275
+ uses: cypress-io/github-action@v6
276
276
  env:
277
277
  CYPRESS_host: api.dev.local
278
278
  CYPRESS_port: 4222
@@ -298,7 +298,7 @@ jobs:
298
298
  uses: actions/checkout@v3
299
299
 
300
300
  - name: Cypress run
301
- uses: cypress-io/github-action@v5
301
+ uses: cypress-io/github-action@v6
302
302
  with:
303
303
  spec: cypress/e2e/spec1.cy.js
304
304
  ```
@@ -328,7 +328,7 @@ jobs:
328
328
  - name: Checkout
329
329
  uses: actions/checkout@v3
330
330
  - name: Cypress run
331
- uses: cypress-io/github-action@v5
331
+ uses: cypress-io/github-action@v6
332
332
  with:
333
333
  project: ./some/nested/folder
334
334
  ```
@@ -351,7 +351,7 @@ jobs:
351
351
  uses: actions/checkout@v3
352
352
 
353
353
  - name: Cypress run
354
- uses: cypress-io/github-action@v5
354
+ uses: cypress-io/github-action@v6
355
355
  with:
356
356
  record: true
357
357
  env:
@@ -383,7 +383,7 @@ jobs:
383
383
  uses: actions/checkout@v3
384
384
 
385
385
  - name: Cypress run
386
- uses: cypress-io/github-action@v5
386
+ uses: cypress-io/github-action@v6
387
387
  with:
388
388
  record: true
389
389
  env:
@@ -421,7 +421,7 @@ jobs:
421
421
  uses: actions/checkout@v3
422
422
 
423
423
  - name: Cypress run
424
- uses: cypress-io/github-action@v5
424
+ uses: cypress-io/github-action@v6
425
425
  with:
426
426
  record: true
427
427
  tag: node-${{ matrix.node }}
@@ -457,7 +457,7 @@ jobs:
457
457
  uses: actions/checkout@v3
458
458
 
459
459
  - name: Cypress run
460
- uses: cypress-io/github-action@v5
460
+ uses: cypress-io/github-action@v6
461
461
  with:
462
462
  record: true
463
463
  # Cancel the run after 2 failed tests
@@ -482,7 +482,7 @@ jobs:
482
482
  name: Artifacts
483
483
  steps:
484
484
  - uses: actions/checkout@v3
485
- - uses: cypress-io/github-action@v5
485
+ - uses: cypress-io/github-action@v6
486
486
  # after the test run completes store videos and any screenshots
487
487
  - uses: actions/upload-artifact@v3
488
488
  # add the line below to store screenshots only on failures
@@ -538,7 +538,7 @@ jobs:
538
538
  uses: actions/checkout@v3
539
539
 
540
540
  - name: Cypress run
541
- uses: cypress-io/github-action@v5
541
+ uses: cypress-io/github-action@v6
542
542
  with:
543
543
  config: pageLoadTimeout=100000,baseUrl=http://localhost:3000
544
544
  ```
@@ -561,7 +561,7 @@ jobs:
561
561
  uses: actions/checkout@v3
562
562
 
563
563
  - name: Cypress run
564
- uses: cypress-io/github-action@v5
564
+ uses: cypress-io/github-action@v6
565
565
  with:
566
566
  config-file: tests/cypress-config.json
567
567
  ```
@@ -595,7 +595,7 @@ jobs:
595
595
  # because of "record" and "parallel" parameters
596
596
  # these containers will load balance all found tests among themselves
597
597
  - name: Cypress run
598
- uses: cypress-io/github-action@v5
598
+ uses: cypress-io/github-action@v6
599
599
  with:
600
600
  record: true
601
601
  parallel: true
@@ -622,10 +622,10 @@ During staged rollout of a new GitHub-hosted runner version, GitHub may provide
622
622
 
623
623
  ```yml
624
624
  - name: Run E2E tests
625
- uses: cypress-io/github-action@v5
625
+ uses: cypress-io/github-action@v6
626
626
 
627
627
  - name: Run Component Testing
628
- uses: cypress-io/github-action@v5
628
+ uses: cypress-io/github-action@v6
629
629
  with:
630
630
  # we have already installed everything
631
631
  install: false
@@ -648,7 +648,7 @@ jobs:
648
648
  - name: Checkout
649
649
  uses: actions/checkout@v3
650
650
  - name: Cypress run
651
- uses: cypress-io/github-action@v5
651
+ uses: cypress-io/github-action@v6
652
652
  with:
653
653
  build: npm run build
654
654
  ```
@@ -667,7 +667,7 @@ jobs:
667
667
  - name: Checkout
668
668
  uses: actions/checkout@v3
669
669
  - name: Cypress run
670
- uses: cypress-io/github-action@v5
670
+ uses: cypress-io/github-action@v6
671
671
  with:
672
672
  start: npm start
673
673
  ```
@@ -685,7 +685,7 @@ jobs:
685
685
  - name: Checkout
686
686
  uses: actions/checkout@v3
687
687
  - name: Cypress run
688
- uses: cypress-io/github-action@v5
688
+ uses: cypress-io/github-action@v6
689
689
  with:
690
690
  # Linux and MacOS
691
691
  start: npm start
@@ -711,7 +711,7 @@ jobs:
711
711
  - name: Checkout
712
712
  uses: actions/checkout@v3
713
713
  - name: Cypress run
714
- uses: cypress-io/github-action@v5
714
+ uses: cypress-io/github-action@v6
715
715
  with:
716
716
  start: npm run api, npm run web
717
717
  ```
@@ -741,7 +741,7 @@ jobs:
741
741
  - name: Checkout
742
742
  uses: actions/checkout@v3
743
743
  - name: Cypress run
744
- uses: cypress-io/github-action@v5
744
+ uses: cypress-io/github-action@v6
745
745
  with:
746
746
  start: npm start
747
747
  # quote the url to be safe against YML parsing surprises
@@ -755,7 +755,7 @@ jobs:
755
755
  By default, `wait-on` will retry for 60 seconds. You can pass a custom timeout in seconds using `wait-on-timeout`.
756
756
 
757
757
  ```yml
758
- - uses: cypress-io/github-action@v5
758
+ - uses: cypress-io/github-action@v6
759
759
  with:
760
760
  start: npm start
761
761
  wait-on: 'http://localhost:8080/status'
@@ -768,7 +768,7 @@ By default, `wait-on` will retry for 60 seconds. You can pass a custom timeout i
768
768
  You can wait for multiple URLs to respond by separating urls with a comma
769
769
 
770
770
  ```yml
771
- - uses: cypress-io/github-action@v5
771
+ - uses: cypress-io/github-action@v6
772
772
  with:
773
773
  # API runs on port 3050
774
774
  # Web server runs on port 8080
@@ -782,7 +782,7 @@ The action will wait for the first url to respond, then will check the second ur
782
782
  You can even use your own command (usually by using `npm`, `yarn`, `npx`) to wait for the server to respond. For example, if you want to use the [wait-on](https://github.com/jeffbski/wait-on) utility to ping the server and run the Cypress tests after the server responds:
783
783
 
784
784
  ```yml
785
- - uses: cypress-io/github-action@v5
785
+ - uses: cypress-io/github-action@v6
786
786
  with:
787
787
  start: npm start
788
788
  wait-on: 'npx wait-on --timeout 60000 http://localhost:3000'
@@ -805,7 +805,7 @@ Under Node.js version 18 and later, `wait-on` may fail to recognize that a `loca
805
805
  If you want to overwrite the install command
806
806
 
807
807
  ```yml
808
- - uses: cypress-io/github-action@v5
808
+ - uses: cypress-io/github-action@v6
809
809
  with:
810
810
  install-command: yarn --frozen-lockfile --silent
811
811
  ```
@@ -826,7 +826,7 @@ jobs:
826
826
  - name: Checkout
827
827
  uses: actions/checkout@v3
828
828
  - name: Cypress run
829
- uses: cypress-io/github-action@v5
829
+ uses: cypress-io/github-action@v6
830
830
  with:
831
831
  start: npm start
832
832
  # quote the url to be safe against YML parsing surprises
@@ -846,7 +846,7 @@ steps:
846
846
  uses: actions/checkout@v3
847
847
 
848
848
  - name: Custom tests 🧪
849
- uses: cypress-io/github-action@v5
849
+ uses: cypress-io/github-action@v6
850
850
  with:
851
851
  command: npm run e2e:ci
852
852
  ```
@@ -871,7 +871,7 @@ jobs:
871
871
  containers: [1, 2, 3]
872
872
  steps:
873
873
  - uses: actions/checkout@v3
874
- - uses: cypress-io/github-action@v5
874
+ - uses: cypress-io/github-action@v6
875
875
  with:
876
876
  record: true
877
877
  parallel: true
@@ -906,7 +906,7 @@ jobs:
906
906
  needs: ['prepare']
907
907
  steps:
908
908
  - uses: actions/checkout@v3
909
- - uses: cypress-io/github-action@v5
909
+ - uses: cypress-io/github-action@v6
910
910
  with:
911
911
  record: true
912
912
  parallel: true
@@ -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
@@ -974,13 +946,15 @@ jobs:
974
946
  runs-on: ubuntu-22.04
975
947
  steps:
976
948
  - uses: actions/checkout@v3
977
- - uses: cypress-io/github-action@v5
949
+ - uses: cypress-io/github-action@v6
978
950
  with:
979
951
  start: npm start
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
 
@@ -1018,13 +992,11 @@ jobs:
1018
992
 
1019
993
  # Cypress has its own package.json in folder "e2e"
1020
994
  - name: Install Cypress and run tests
1021
- uses: cypress-io/github-action@v5
995
+ uses: cypress-io/github-action@v6
1022
996
  with:
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,9 +1013,9 @@ 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
- uses: cypress-io/github-action@v5
1018
+ uses: cypress-io/github-action@v6
1047
1019
  with:
1048
1020
  working-directory: examples/basic-pnpm
1049
1021
  ```
@@ -1064,7 +1036,7 @@ jobs:
1064
1036
  - name: Checkout
1065
1037
  uses: actions/checkout@v3
1066
1038
  - name: Cypress run
1067
- uses: cypress-io/github-action@v5
1039
+ uses: cypress-io/github-action@v6
1068
1040
  with:
1069
1041
  working-directory: examples/yarn-classic
1070
1042
  ```
@@ -1085,7 +1057,7 @@ jobs:
1085
1057
  - name: Checkout
1086
1058
  uses: actions/checkout@v3
1087
1059
  - name: Cypress run
1088
- uses: cypress-io/github-action@v5
1060
+ uses: cypress-io/github-action@v6
1089
1061
  with:
1090
1062
  working-directory: examples/yarn-modern
1091
1063
  install-command: yarn install
@@ -1110,7 +1082,7 @@ jobs:
1110
1082
  - name: Checkout
1111
1083
  uses: actions/checkout@v3
1112
1084
  - name: Cypress run
1113
- uses: cypress-io/github-action@v5
1085
+ uses: cypress-io/github-action@v6
1114
1086
  with:
1115
1087
  working-directory: examples/yarn-modern-pnp
1116
1088
  install-command: yarn install
@@ -1138,7 +1110,7 @@ jobs:
1138
1110
  runs-on: ubuntu-22.04
1139
1111
  steps:
1140
1112
  - uses: actions/checkout@v3
1141
- - uses: cypress-io/github-action@v5
1113
+ - uses: cypress-io/github-action@v6
1142
1114
  with:
1143
1115
  working-directory: examples/start-and-yarn-workspaces/workspace-1
1144
1116
  build: yarn run build
@@ -1173,7 +1145,7 @@ jobs:
1173
1145
  # run Cypress tests and record them under the same run
1174
1146
  # associated with commit SHA and just give a different group name
1175
1147
  - name: Cypress run
1176
- uses: cypress-io/github-action@v5
1148
+ uses: cypress-io/github-action@v6
1177
1149
  with:
1178
1150
  record: true
1179
1151
  group: Tests on Node v${{ matrix.node }}
@@ -1202,7 +1174,7 @@ jobs:
1202
1174
  with:
1203
1175
  node-version: ${{ matrix.node }}
1204
1176
  - uses: actions/checkout@v3
1205
- - uses: cypress-io/github-action@v5
1177
+ - uses: cypress-io/github-action@v6
1206
1178
  ```
1207
1179
 
1208
1180
  See the [Node.js](#nodejs) section for information about supported versions and usage of Node.js.
@@ -1222,13 +1194,13 @@ jobs:
1222
1194
  steps:
1223
1195
  - uses: actions/checkout@master
1224
1196
  - name: Install dependencies
1225
- uses: cypress-io/github-action@v5
1197
+ uses: cypress-io/github-action@v6
1226
1198
  with:
1227
1199
  # just perform install
1228
1200
  runTests: false
1229
1201
  - run: yarn lint
1230
1202
  - name: Run e2e tests
1231
- uses: cypress-io/github-action@v5
1203
+ uses: cypress-io/github-action@v6
1232
1204
  with:
1233
1205
  # we have already installed all dependencies above
1234
1206
  install: false
@@ -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
 
@@ -1255,7 +1227,7 @@ If the project has many dependencies, but you want to install just Cypress you c
1255
1227
  node_modules
1256
1228
  key: my-cache-${{ runner.os }}-${{ hashFiles('package-lock.json') }}
1257
1229
  - run: npm i cypress
1258
- - uses: cypress-io/github-action@v5
1230
+ - uses: cypress-io/github-action@v6
1259
1231
  with:
1260
1232
  install: false
1261
1233
  ```
@@ -1275,13 +1247,11 @@ jobs:
1275
1247
  timeout-minutes: 10
1276
1248
  steps:
1277
1249
  - uses: actions/checkout@v3
1278
- - uses: cypress-io/github-action@v5
1250
+ - uses: cypress-io/github-action@v6
1279
1251
  # you can specify individual step timeout too
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 -->
@@ -1325,7 +1290,7 @@ You can set the environment variable using GitHub UI interface, or in the workfl
1325
1290
 
1326
1291
  ```yml
1327
1292
  - name: Cypress tests with debug logs
1328
- uses: cypress-io/github-action@v5
1293
+ uses: cypress-io/github-action@v6
1329
1294
  env:
1330
1295
  DEBUG: '@cypress/github-action'
1331
1296
  ```
@@ -1338,7 +1303,7 @@ The above `ACTIONS_STEP_DEBUG` setting enables the debug logs from the action it
1338
1303
 
1339
1304
  ```yml
1340
1305
  - name: Cypress tests with debug logs
1341
- uses: cypress-io/github-action@v5
1306
+ uses: cypress-io/github-action@v6
1342
1307
  env:
1343
1308
  DEBUG: 'cypress:*'
1344
1309
  ```
@@ -1384,7 +1349,7 @@ This is an example of using the step output `resultsUrl`:
1384
1349
 
1385
1350
  ```yml
1386
1351
  - name: Cypress tests
1387
- uses: cypress-io/github-action@v5
1352
+ uses: cypress-io/github-action@v6
1388
1353
  # let's give this action an ID so we can refer
1389
1354
  # to its output values later
1390
1355
  id: cypress
@@ -1423,7 +1388,7 @@ jobs:
1423
1388
  - name: Checkout
1424
1389
  uses: actions/checkout@v3
1425
1390
  - name: Cypress run
1426
- uses: cypress-io/github-action@v5
1391
+ uses: cypress-io/github-action@v6
1427
1392
  with:
1428
1393
  build: npx cypress info
1429
1394
  ```
@@ -1440,14 +1405,14 @@ jobs:
1440
1405
  - name: Checkout
1441
1406
  uses: actions/checkout@v3
1442
1407
  - name: Cypress install
1443
- uses: cypress-io/github-action@v5
1408
+ uses: cypress-io/github-action@v6
1444
1409
  with:
1445
1410
  # just perform install
1446
1411
  runTests: false
1447
1412
  - name: Cypress info
1448
1413
  run: npx cypress info
1449
1414
  - name: Cypress run
1450
- uses: cypress-io/github-action@v5
1415
+ uses: cypress-io/github-action@v6
1451
1416
  with:
1452
1417
  # we have already installed all dependencies above
1453
1418
  install: false
@@ -1471,7 +1436,7 @@ jobs:
1471
1436
  - name: Checkout
1472
1437
  uses: actions/checkout@v3
1473
1438
  - name: Cypress nightly tests 🌃
1474
- uses: cypress-io/github-action@v5
1439
+ uses: cypress-io/github-action@v6
1475
1440
  ```
1476
1441
 
1477
1442
  [![cron example](https://github.com/cypress-io/github-action/workflows/example-cron/badge.svg?branch=master)](.github/workflows/example-cron.yml)
@@ -1492,7 +1457,7 @@ jobs:
1492
1457
  - name: Checkout
1493
1458
  uses: actions/checkout@v3
1494
1459
  - name: Cypress run
1495
- uses: cypress-io/github-action@v5
1460
+ uses: cypress-io/github-action@v6
1496
1461
  with:
1497
1462
  publish-summary: false
1498
1463
  ```
@@ -1501,7 +1466,7 @@ jobs:
1501
1466
 
1502
1467
  ### Support
1503
1468
 
1504
- Node.js is required to run this action. The currently recommended version `v5` supports:
1469
+ Node.js is required to run this action. The recommended version `v6` supports:
1505
1470
 
1506
1471
  - **Node.js** 16.x
1507
1472
  - **Node.js** 18.x
@@ -1523,9 +1488,9 @@ View the [CHANGELOG](./CHANGELOG.md) document for an overview of version changes
1523
1488
 
1524
1489
  ## Compatibility
1525
1490
 
1526
- - `v6` is provided for early adopters needing full `node20` support
1527
- - `v5` is the current recommended version
1528
- - `v4` is the minimum version required for Cypress `10.x` and later
1491
+ - `v6` is the current recommended version and uses `node20`
1492
+ - `v5` uses `node16`
1493
+ - `v4` is the minimum version required for Cypress `10.x` and later - also uses `node16`
1529
1494
 
1530
1495
  Pay attention to any GitHub Actions deprecation warnings shown in logs which may recommend updating.
1531
1496
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cypress/github-action",
3
- "version": "6.1.0",
3
+ "version": "6.3.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",