@cypress/github-action 6.10.1 → 6.10.3

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 (3) hide show
  1. package/README.md +24 -14
  2. package/dist/index.js +87 -87
  3. package/package.json +11 -10
package/README.md CHANGED
@@ -157,6 +157,12 @@ Alternatively, to mitigate unforeseen breaks, bind to a specific [tag](https://g
157
157
 
158
158
  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.md) for an overview of major changes.
159
159
 
160
+ The workflows in the [examples](./examples/) directory use the latest commit from the repo's current branch. This allows all tests to run in CI before release. If you copy any of the examples to your own repo, you should replace `./` and specify instead the action and version as described above.
161
+
162
+ ```yml
163
+ - uses: ./ # replace with cypress-io/github-action@v6
164
+ ```
165
+
160
166
  ### Browser
161
167
 
162
168
  Specify the browser name or path with the `browser` parameter. The default browser, if none is specified, is the built-in [Electron browser](https://on.cypress.io/guides/guides/launching-browsers#Electron-Browser).
@@ -192,9 +198,9 @@ jobs:
192
198
  name: E2E on Chrome for Testing
193
199
  steps:
194
200
  - uses: actions/checkout@v4
195
- - uses: browser-actions/setup-chrome@v1
201
+ - uses: browser-actions/setup-chrome@v2
196
202
  with:
197
- chrome-version: 137
203
+ chrome-version: 140
198
204
  - uses: cypress-io/github-action@v6
199
205
  with:
200
206
  browser: chrome-for-testing
@@ -384,7 +390,7 @@ For more information, visit [the Cypress command-line docs](https://on.cypress.i
384
390
 
385
391
  ### Project
386
392
 
387
- Specify the [project to run](https://docs.cypress.io/guides/guides/command-line.html#cypress-run-project-lt-project-path-gt) with `project` parameter
393
+ Specify the [project to run](https://on.cypress.io/command-line#cypress-run-project-lt-project-path-gt) with the `project` parameter
388
394
 
389
395
  ```yml
390
396
  name: Cypress tests
@@ -399,10 +405,14 @@ jobs:
399
405
  - name: Cypress run
400
406
  uses: cypress-io/github-action@v6
401
407
  with:
402
- project: ./some/nested/folder
408
+ project: ./test-subdirectory
403
409
  ```
404
410
 
405
- For more information, visit [the Cypress command-line docs](https://on.cypress.io/command-line#cypress-run-project-lt-project-path-gt).
411
+ The `project` parameter may be used to pass on the location of a sub-directory containing a Cypress configuration file and Cypress tests specs. For more information, visit [the Cypress command-line docs](https://on.cypress.io/command-line#cypress-run-project-lt-project-path-gt).
412
+
413
+ A package manager lock file, including Cypress, must be provided in the root of the repository so that the action is able to [install Cypress](#installation).
414
+
415
+ If the parameter [working-directory](#working-directory) is also defined, then this is the location to place the package manager lock file, and the project directory would be a subdirectory of the [working-directory](#working-directory). The `project` parameter location may not be above the level of a specified [working-directory](#working-directory) in the file hierarchy.
406
416
 
407
417
  ### Record test results on Cypress Cloud
408
418
 
@@ -553,7 +563,7 @@ jobs:
553
563
  # let's make sure our "app" works on several versions of Node
554
564
  strategy:
555
565
  matrix:
556
- node: [20, 22, 24]
566
+ node: [20, 22, 24, 25]
557
567
  name: E2E on Node v${{ matrix.node }}
558
568
  steps:
559
569
  - name: Setup Node
@@ -656,7 +666,7 @@ jobs:
656
666
  # Install npm dependencies, cache them correctly
657
667
  # and run all Cypress tests with `quiet` parameter
658
668
  - name: Cypress run
659
- uses: ./
669
+ uses: cypress-io/github-action@v6
660
670
  with:
661
671
  working-directory: examples/quiet
662
672
  quiet: true
@@ -1091,8 +1101,8 @@ repo/
1091
1101
  fixtures/
1092
1102
  support/
1093
1103
  cypress.config.js
1094
- package.json
1095
- package-lock.json
1104
+ package.json
1105
+ package-lock.json
1096
1106
  ```
1097
1107
 
1098
1108
  We use `working-directory: app-test` to match the above example directory structure:
@@ -1159,7 +1169,7 @@ jobs:
1159
1169
 
1160
1170
  The package manager `pnpm` is not pre-installed in [GitHub Actions runner images](https://github.com/actions/runner-images) (unlike `npm` and `yarn`) and so it must be installed in a separate workflow step (see below). 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.
1161
1171
 
1162
- The example below follows [pnpm recommendations](https://pnpm.io/continuous-integration#github-actions) for installing pnpm and caching the [pnpm store](https://pnpm.io/cli/store). Follow the [Cypress pnpm configuration instructions](https://on.cypress.io/install#pnpm-Configuration) and apply them to your project, to enable pnpm to install the Cypress binary.
1172
+ The example below follows [pnpm recommendations](https://pnpm.io/continuous-integration#github-actions) for installing pnpm and caching the [pnpm store](https://pnpm.io/cli/store). Follow the [Cypress pnpm configuration instructions](https://docs.cypress.io/app/get-started/install-cypress#pnpm-configuration) and apply them to your project, to enable pnpm to install the Cypress binary.
1163
1173
 
1164
1174
  ```yaml
1165
1175
  name: example-basic-pnpm
@@ -1334,7 +1344,7 @@ jobs:
1334
1344
  # let's make sure our "app" works on several versions of Node
1335
1345
  strategy:
1336
1346
  matrix:
1337
- node: [20, 22, 24]
1347
+ node: [20, 22, 24, 25]
1338
1348
  name: E2E on Node v${{ matrix.node }}
1339
1349
  steps:
1340
1350
  - name: Setup Node
@@ -1368,7 +1378,7 @@ jobs:
1368
1378
  runs-on: ubuntu-24.04
1369
1379
  strategy:
1370
1380
  matrix:
1371
- node: [20, 22, 24]
1381
+ node: [20, 22, 24, 25]
1372
1382
  name: E2E on Node v${{ matrix.node }}
1373
1383
  steps:
1374
1384
  - uses: actions/setup-node@v4
@@ -1574,7 +1584,7 @@ There is no equivalent action parameter for the CLI options `help`, `key`, `--no
1574
1584
 
1575
1585
  ### Installation
1576
1586
 
1577
- This action installs local dependencies using lock files. Ensure that exactly one type of lock file is used for each project or working-directory from the following supported package managers:
1587
+ This action installs local dependencies using lock files. Ensure that exactly one type of lock file is used at the root of the repo or in each working-directory of a monorepo from the following supported package managers:
1578
1588
 
1579
1589
  | Lock file | Package Manager | Installation command |
1580
1590
  | ------------------- | ------------------------------------------------------------------------------------------------ | -------------------------------- |
@@ -1835,7 +1845,7 @@ jobs:
1835
1845
 
1836
1846
  Node.js is required to run this action. The recommended version `v6` supports:
1837
1847
 
1838
- - **Node.js** 20.x, 22.x and 24.x
1848
+ - **Node.js** 20.x, 22.x, 24.x and 25.x
1839
1849
 
1840
1850
  and is generally aligned with [Node.js's release schedule](https://github.com/nodejs/Release).
1841
1851
 
package/dist/index.js CHANGED
@@ -80421,92 +80421,6 @@ function wrappy (fn, cb) {
80421
80421
  }
80422
80422
 
80423
80423
 
80424
- /***/ }),
80425
-
80426
- /***/ 9922:
80427
- /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
80428
-
80429
- const got = __nccwpck_require__(3061)
80430
- const debug = __nccwpck_require__(8237)('@cypress/github-action')
80431
-
80432
- /**
80433
- * A small utility for checking when an URL responds, kind of
80434
- * a poor man's https://www.npmjs.com/package/wait-on. This version
80435
- * is implemented using https://github.com/sindresorhus/got
80436
- */
80437
- const ping = (url, timeout) => {
80438
- if (!timeout) {
80439
- throw new Error('Expected timeout in ms')
80440
- }
80441
-
80442
- // make copy of the error codes that "got" retries on
80443
- const errorCodes = [...got.defaults.options.retry.errorCodes]
80444
- errorCodes.push('ESOCKETTIMEDOUT')
80445
-
80446
- // we expect the server to respond within a time limit
80447
- // and if it does not - retry up to total "timeout" duration
80448
- const individualPingTimeout = Math.min(timeout, 30000)
80449
-
80450
- // add to the timeout max individual ping timeout
80451
- // to avoid long-waiting ping from "rolling" over the end
80452
- // and preventing pinging the last time
80453
- timeout += individualPingTimeout
80454
- const limit = Math.ceil(timeout / individualPingTimeout)
80455
-
80456
- debug(`total ping timeout ${timeout}`)
80457
- debug(`individual ping timeout ${individualPingTimeout}ms`)
80458
- debug(`retries limit ${limit}`)
80459
-
80460
- const start = +new Date()
80461
- return got(url, {
80462
- headers: {
80463
- Accept: 'text/html, application/json, text/plain, */*'
80464
- },
80465
- timeout: individualPingTimeout,
80466
- errorCodes,
80467
- retry: {
80468
- limit,
80469
- calculateDelay({ error, attemptCount }) {
80470
- if (error) {
80471
- debug(`got error ${JSON.stringify(error)}`)
80472
- }
80473
- const now = +new Date()
80474
- const elapsed = now - start
80475
- debug(
80476
- `${elapsed}ms ${error.method} ${error.host} ${error.code} attempt ${attemptCount}`
80477
- )
80478
- if (elapsed > timeout) {
80479
- console.error(
80480
- '%s timed out on retry %d of %d, elapsed %dms, limit %dms',
80481
- url,
80482
- attemptCount,
80483
- limit,
80484
- elapsed,
80485
- timeout
80486
- )
80487
- return 0
80488
- }
80489
-
80490
- // if the error code is ECONNREFUSED use shorter timeout
80491
- // because the server is probably starting
80492
- if (error.code === 'ECONNREFUSED') {
80493
- return 1000
80494
- }
80495
-
80496
- // default "long" timeout
80497
- return individualPingTimeout
80498
- }
80499
- }
80500
- }).then(() => {
80501
- const now = +new Date()
80502
- const elapsed = now - start
80503
- debug(`pinging ${url} has finished ok after ${elapsed}ms`)
80504
- })
80505
- }
80506
-
80507
- module.exports = { ping }
80508
-
80509
-
80510
80424
  /***/ }),
80511
80425
 
80512
80426
  /***/ 9491:
@@ -91897,6 +91811,92 @@ module.exports.As = safeParse
91897
91811
  __webpack_unused_export__ = defaultContentType
91898
91812
 
91899
91813
 
91814
+ /***/ }),
91815
+
91816
+ /***/ 2851:
91817
+ /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
91818
+
91819
+ const got = __nccwpck_require__(3061)
91820
+ const debug = __nccwpck_require__(8237)('@cypress/github-action')
91821
+
91822
+ /**
91823
+ * A small utility for checking when an URL responds, kind of
91824
+ * a poor man's https://www.npmjs.com/package/wait-on. This version
91825
+ * is implemented using https://github.com/sindresorhus/got
91826
+ */
91827
+ const ping = (url, timeout) => {
91828
+ if (!timeout) {
91829
+ throw new Error('Expected timeout in ms')
91830
+ }
91831
+
91832
+ // make copy of the error codes that "got" retries on
91833
+ const errorCodes = [...got.defaults.options.retry.errorCodes]
91834
+ errorCodes.push('ESOCKETTIMEDOUT')
91835
+
91836
+ // we expect the server to respond within a time limit
91837
+ // and if it does not - retry up to total "timeout" duration
91838
+ const individualPingTimeout = Math.min(timeout, 30000)
91839
+
91840
+ // add to the timeout max individual ping timeout
91841
+ // to avoid long-waiting ping from "rolling" over the end
91842
+ // and preventing pinging the last time
91843
+ timeout += individualPingTimeout
91844
+ const limit = Math.ceil(timeout / individualPingTimeout)
91845
+
91846
+ debug(`total ping timeout ${timeout}`)
91847
+ debug(`individual ping timeout ${individualPingTimeout}ms`)
91848
+ debug(`retries limit ${limit}`)
91849
+
91850
+ const start = +new Date()
91851
+ return got(url, {
91852
+ headers: {
91853
+ Accept: 'text/html, application/json, text/plain, */*'
91854
+ },
91855
+ timeout: individualPingTimeout,
91856
+ errorCodes,
91857
+ retry: {
91858
+ limit,
91859
+ calculateDelay({ error, attemptCount }) {
91860
+ if (error) {
91861
+ debug(`got error ${JSON.stringify(error)}`)
91862
+ }
91863
+ const now = +new Date()
91864
+ const elapsed = now - start
91865
+ debug(
91866
+ `${elapsed}ms ${error.method} ${error.host} ${error.code} attempt ${attemptCount}`
91867
+ )
91868
+ if (elapsed > timeout) {
91869
+ console.error(
91870
+ '%s timed out on retry %d of %d, elapsed %dms, limit %dms',
91871
+ url,
91872
+ attemptCount,
91873
+ limit,
91874
+ elapsed,
91875
+ timeout
91876
+ )
91877
+ return 0
91878
+ }
91879
+
91880
+ // if the error code is ECONNREFUSED use shorter timeout
91881
+ // because the server is probably starting
91882
+ if (error.code === 'ECONNREFUSED') {
91883
+ return 1000
91884
+ }
91885
+
91886
+ // default "long" timeout
91887
+ return individualPingTimeout
91888
+ }
91889
+ }
91890
+ }).then(() => {
91891
+ const now = +new Date()
91892
+ const elapsed = now - start
91893
+ debug(`pinging ${url} has finished ok after ${elapsed}ms`)
91894
+ })
91895
+ }
91896
+
91897
+ module.exports = { ping }
91898
+
91899
+
91900
91900
  /***/ }),
91901
91901
 
91902
91902
  /***/ 8570:
@@ -93275,7 +93275,7 @@ const quote = __nccwpck_require__(5427)
93275
93275
  const cliParser = __nccwpck_require__(8604)()
93276
93276
  const findYarnWorkspaceRoot = __nccwpck_require__(6748)
93277
93277
  const debug = __nccwpck_require__(8237)('@cypress/github-action')
93278
- const { ping } = __nccwpck_require__(9922)
93278
+ const { ping } = __nccwpck_require__(2851)
93279
93279
  const { SUMMARY_ENV_VAR } = __nccwpck_require__(1327)
93280
93280
 
93281
93281
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cypress/github-action",
3
- "version": "6.10.1",
3
+ "version": "6.10.3",
4
4
  "description": "GitHub Action for running Cypress end-to-end and component tests",
5
5
  "private": false,
6
6
  "main": "dist/index.js",
@@ -19,7 +19,7 @@
19
19
  "format:all:check": "prettier --check .",
20
20
  "lint": "eslint",
21
21
  "lint:fix": "eslint --fix",
22
- "check:markdown-links": "find *.md docs/*.md -print0 | xargs -0 -n1 markdown-link-check",
22
+ "check:markdown-links": "find *.md docs/*.md -print0 | xargs -0 -n1 markdown-link-check -c markdownLinkConfig.json",
23
23
  "update:cypress": "./scripts/update-cypress-latest.sh",
24
24
  "prepare": "husky"
25
25
  },
@@ -33,6 +33,7 @@
33
33
  ],
34
34
  "author": "Cypress-io",
35
35
  "license": "MIT",
36
+ "type": "commonjs",
36
37
  "bugs": {
37
38
  "url": "https://github.com/cypress-io/github-action/issues"
38
39
  },
@@ -52,16 +53,16 @@
52
53
  "supports-color": "9.3.1"
53
54
  },
54
55
  "devDependencies": {
55
- "@eslint/js": "9.26.0",
56
- "@stylistic/eslint-plugin": "4.4.1",
57
- "@types/node": "22.13.10",
56
+ "@eslint/js": "9.38.0",
57
+ "@stylistic/eslint-plugin": "5.5.0",
58
+ "@types/node": "24.0.15",
58
59
  "@vercel/ncc": "0.38.1",
59
- "eslint": "9.26.0",
60
- "eslint-plugin-cypress": "4.3.0",
61
- "globals": "16.0.0",
60
+ "eslint": "9.38.0",
61
+ "eslint-plugin-cypress": "5.2.0",
62
+ "globals": "16.4.0",
62
63
  "husky": "9.1.7",
63
- "markdown-link-check": "3.13.7",
64
- "prettier": "3.5.3"
64
+ "markdown-link-check": "3.14.1",
65
+ "prettier": "3.6.2"
65
66
  },
66
67
  "publishConfig": {
67
68
  "access": "public"