Skip to content

Commit 16bf365

Browse files
authored
Merge branch 'master' into feat/record-in-fork-rev2
2 parents 4a3aaa3 + 9e53751 commit 16bf365

8 files changed

+187
-55
lines changed

DEVELOPMENT.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
```yml
1919
name: End-to-end tests
20-
on: [push]
20+
on: push
2121
jobs:
2222
cypress-run:
2323
runs-on: 22.04

README.md

+32-34
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
- [Explicit version](#explicit-version)
99
- Run tests in a given [browser](#browser)
1010
- using [Firefox](#firefox)
11-
- using [Edge](#edge)
11+
- using [Edge](#edge)
1212
- using [headed mode](#headed)
1313
- Using [Docker image](#docker-image)
1414
- Specify [environment variables](#env)
@@ -47,7 +47,7 @@
4747

4848
```yml
4949
name: End-to-end tests
50-
on: [push]
50+
on: push
5151
jobs:
5252
cypress-run:
5353
runs-on: ubuntu-22.04
@@ -92,7 +92,7 @@ Specify the browser name or path with `browser` parameter
9292

9393
```yml
9494
name: E2E on Chrome
95-
on: [push]
95+
on: push
9696
jobs:
9797
cypress-run:
9898
runs-on: ubuntu-22.04
@@ -154,7 +154,7 @@ Run the browser in headed mode - as of Cypress v8.0 the `cypress run` command ex
154154

155155
```yml
156156
name: Chrome headed
157-
on: [push]
157+
on: push
158158
jobs:
159159
cypress-run:
160160
runs-on: ubuntu-22.04
@@ -172,7 +172,7 @@ You can run tests in a GH Action in your Docker container.
172172

173173
```yml
174174
name: E2E in custom container
175-
on: [push]
175+
on: push
176176
jobs:
177177
cypress-run:
178178
runs-on: ubuntu-22.04
@@ -192,7 +192,7 @@ Specify the env argument with `env` parameter
192192

193193
```yml
194194
name: Cypress tests
195-
on: [push]
195+
on: push
196196
jobs:
197197
cypress-run:
198198
runs-on: ubuntu-22.04
@@ -210,7 +210,7 @@ When passing the environment variables this way, unfortunately due to GitHub Act
210210

211211
```yml
212212
name: Cypress tests
213-
on: [push]
213+
on: push
214214
jobs:
215215
cypress-run:
216216
runs-on: ubuntu-22.04
@@ -235,7 +235,7 @@ Specify the [spec files to run](https://docs.cypress.io/guides/guides/command-li
235235

236236
```yml
237237
name: Cypress tests
238-
on: [push]
238+
on: push
239239
jobs:
240240
cypress-run:
241241
name: Cypress run
@@ -266,7 +266,7 @@ Specify the [project to run](https://docs.cypress.io/guides/guides/command-line.
266266

267267
```yml
268268
name: Cypress tests
269-
on: [push]
269+
on: push
270270
jobs:
271271
cypress-run:
272272
name: Cypress run
@@ -286,7 +286,7 @@ For more information, visit [the Cypress command-line docs](https://on.cypress.i
286286

287287
```yml
288288
name: Cypress tests
289-
on: [push]
289+
on: push
290290
jobs:
291291
cypress-run:
292292
name: Cypress run
@@ -318,7 +318,7 @@ jobs:
318318

319319
```yml
320320
name: Cypress tests
321-
on: [push]
321+
on: push
322322
jobs:
323323
cypress-run:
324324
name: Cypress run
@@ -346,7 +346,7 @@ You can provide `quiet` flag for cypress run to silence any Cypress specific out
346346

347347
```yml
348348
name: example-quiet
349-
on: [push]
349+
on: push
350350
jobs:
351351
cypress-run:
352352
runs-on: ubuntu-22.04
@@ -370,7 +370,7 @@ You can pass a single or multiple tags when recording a run. For example
370370
371371
```yml
372372
name: tags
373-
on: [push]
373+
on: push
374374
jobs:
375375
cypress-run:
376376
runs-on: ubuntu-22.04
@@ -413,7 +413,7 @@ This feature requires Cypress 12.6.0 or later and a [Cypress Cloud Business or E
413413

414414
```yml
415415
name: Cypress E2E Tests
416-
on: [push]
416+
on: push
417417
jobs:
418418
cypress-run:
419419
runs-on: ubuntu-22.04
@@ -444,7 +444,7 @@ If you don't record the test run on Cypress Cloud, you can still store generated
444444

445445
```yml
446446
name: Artifacts
447-
on: [push]
447+
on: push
448448
jobs:
449449
cypress-run:
450450
runs-on: ubuntu-22.04
@@ -477,7 +477,7 @@ Specify [configuration](https://docs.cypress.io/guides/references/configuration.
477477

478478
```yml
479479
name: Cypress tests
480-
on: [push]
480+
on: push
481481
jobs:
482482
cypress-run:
483483
name: Cypress run
@@ -500,7 +500,7 @@ Specify the path to your config file with `config-file` parameter
500500

501501
```yml
502502
name: Cypress tests
503-
on: [push]
503+
on: push
504504
jobs:
505505
cypress-run:
506506
name: Cypress run
@@ -523,9 +523,7 @@ You can spin multiple containers running in parallel using `strategy: matrix` ar
523523

524524
```yml
525525
name: Parallel Cypress Tests
526-
527-
on: [push]
528-
526+
on: push
529527
jobs:
530528
test:
531529
name: Cypress run
@@ -590,7 +588,7 @@ You can run a build step before starting tests
590588

591589
```yml
592590
name: Build
593-
on: [push]
591+
on: push
594592
jobs:
595593
cypress-run:
596594
runs-on: ubuntu-22.04
@@ -609,7 +607,7 @@ If your tests run against a local server, use `start` parameter, the server will
609607

610608
```yml
611609
name: With server
612-
on: [push]
610+
on: push
613611
jobs:
614612
cypress-run:
615613
runs-on: ubuntu-22.04
@@ -626,7 +624,7 @@ jobs:
626624

627625
```yml
628626
name: With server
629-
on: [push]
627+
on: push
630628
jobs:
631629
cypress-run:
632630
runs-on: ubuntu-22.04
@@ -652,7 +650,7 @@ You can start multiple server processes. For example, if you have an API to star
652650

653651
```yml
654652
name: With servers
655-
on: [push]
653+
on: push
656654
jobs:
657655
cypress-run:
658656
runs-on: ubuntu-22.04
@@ -682,7 +680,7 @@ If you are starting a local server and it takes a while to start, you can add a
682680

683681
```yml
684682
name: After server responds
685-
on: [push]
683+
on: push
686684
jobs:
687685
cypress-run:
688686
runs-on: ubuntu-22.04
@@ -757,7 +755,7 @@ You can prefix the default test command using the `command-prefix` option. This
757755

758756
```yml
759757
name: Visual
760-
on: [push]
758+
on: push
761759
jobs:
762760
e2e:
763761
runs-on: ubuntu-22.04
@@ -798,7 +796,7 @@ You can overwrite [`ci-build-id`](https://on.cypress.io/parallelization#Linking-
798796

799797
```yml
800798
name: Parallel
801-
on: [push]
799+
on: push
802800
jobs:
803801
test:
804802
runs-on: ubuntu-22.04
@@ -905,7 +903,7 @@ repo/
905903
You can specify the `app-test` working directory when running Cypress tests using the `working-directory` parameter
906904

907905
```yml
908-
on: [push]
906+
on: push
909907
jobs:
910908
cypress-run:
911909
runs-on: ubuntu-22.04
@@ -968,7 +966,7 @@ This action should discover the Yarn workspaces correctly. For example, see fold
968966

969967
```yaml
970968
name: example-start-and-yarn-workspaces
971-
on: [push]
969+
on: push
972970
jobs:
973971
single:
974972
# the example has Yarn workspace in its "root" folder
@@ -993,7 +991,7 @@ Sometimes the default cache key does not work. For example, if you cannot share
993991

994992
```yml
995993
name: End-to-end tests
996-
on: [push]
994+
on: push
997995
jobs:
998996
cypress-run:
999997
runs-on: ubuntu-22.04
@@ -1028,7 +1026,7 @@ You can run your tests across multiple Node versions.
10281026

10291027
```yml
10301028
name: Node versions
1031-
on: [push]
1029+
on: push
10321030
jobs:
10331031
cypress-run:
10341032
runs-on: ubuntu-22.04
@@ -1257,7 +1255,7 @@ If your repository does not have `package.json` or `yarn.json` (maybe it contain
12571255

12581256
```yml
12591257
name: included
1260-
on: [push]
1258+
on: push
12611259
jobs:
12621260
cypress-run:
12631261
runs-on: ubuntu-22.04
@@ -1277,7 +1275,7 @@ If you are NOT using the `build` command in your project, you can run the `cypre
12771275

12781276
```yml
12791277
name: info
1280-
on: [push]
1278+
on: push
12811279
jobs:
12821280
cypress-run:
12831281
runs-on: ubuntu-22.04
@@ -1294,7 +1292,7 @@ If you are already using the `build` parameter, you can split the [installation
12941292

12951293
```yml
12961294
name: info
1297-
on: [push]
1295+
on: push
12981296
jobs:
12991297
cypress-run:
13001298
runs-on: ubuntu-22.04

docs/MAINTENANCE.md

+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# Maintenance
2+
3+
This document describes updating the [examples](../examples) in this repository to use the latest Cypress version.
4+
5+
## Examples
6+
7+
There are two groups of examples which are used to test and demonstrate the use of [cypress-io/github-action](https://github.com/cypress-io/github-action):
8+
9+
1. The [examples](../examples) directory contains examples of the use of Cypress (Current) [Configuration](https://docs.cypress.io/guides/references/configuration) which applies to Cypress 10 and later.
10+
11+
2. The [examples/v9](../examples/v9) directory contains examples which are set up to use Cypress `9.7.0` which is the last version using [Legacy Configuration](https://docs.cypress.io/guides/references/legacy-configuration) which applies to Cypress 9 and below.
12+
13+
The examples make use of [npm](https://www.npmjs.com/), [pnpm](https://pnpm.io/) and [Yarn 1 (Classic)](https://classic.yarnpkg.com/) to define and install the packages being used.
14+
15+
## Prerequisites
16+
17+
- A local system running [Ubuntu](https://ubuntu.com/), [Microsoft Windows](https://www.microsoft.com/windows/) or [Apple macOS](https://www.apple.com/macos/).
18+
19+
- The LTS version of [Node.js](https://nodejs.org/). For convenience of switching to other versions of Node.js, [nvm](https://github.com/nvm-sh/nvm) for unix, macOS and windows WSL. For Windows [nvm-windows](https://github.com/coreybutler/nvm-windows).
20+
21+
- [git](https://git-scm.com/) distributed version control system.
22+
23+
- [npm](https://www.npmjs.com/), which is installed with [Node.js](https://nodejs.org/)
24+
25+
- [pnpm](https://pnpm.io/) installed through:
26+
27+
```bash
28+
npm install pnpm@latest -g
29+
```
30+
31+
This needs to be repeated if you change the base node version using nvm.
32+
33+
- [Yarn 1 (Classic)](https://classic.yarnpkg.com/) installed through:
34+
35+
```bash
36+
npm install yarn@latest -g
37+
```
38+
39+
Again, this needs to be repeated if you change the base node version using nvm.
40+
41+
- [Visual Studio Code](https://code.visualstudio.com/) or other editor
42+
43+
## Updating examples
44+
45+
When a new version of [Cypress](https://docs.cypress.io/guides/references/changelog) is published, the examples can be updated.
46+
47+
From the root of a local clone of the repository, execute:
48+
49+
```bash
50+
npm run update:cypress
51+
```
52+
53+
This updates all [examples](../examples) (except [examples/v9](../examples/v9)) to cypress@latest.
54+
55+
[.github/workflows/example-install-only.yml](../.github/workflows/example-install-only.yml) contains a hard-coded Cypress version number. This can be updated by hand.
56+
57+
After updating the examples locally, they can be committed with git and a pull request opened on GitHub.

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
"test": "echo \"There are no tests :(\"",
1414
"build": "ncc build -o dist index.js",
1515
"format": "prettier --write index.js",
16-
"check:markdown": "find *.md -print0 | xargs -0 -n1 markdown-link-check -c md-linkcheck.json",
17-
"install-deps": "./scripts/npm-install-examples.sh"
16+
"check:markdown": "find *.md docs/*.md -print0 | xargs -0 -n1 markdown-link-check -c md-linkcheck.json",
17+
"update:cypress": "./scripts/update-cypress-latest.sh"
1818
},
1919
"repository": {
2020
"type": "git",

scripts/npm-install-examples.sh

-18
This file was deleted.

0 commit comments

Comments
 (0)