@cypress/github-action 6.10.2 → 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 +14 -8
  2. package/dist/index.js +87 -87
  3. package/package.json +10 -9
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
@@ -557,7 +563,7 @@ jobs:
557
563
  # let's make sure our "app" works on several versions of Node
558
564
  strategy:
559
565
  matrix:
560
- node: [20, 22, 24]
566
+ node: [20, 22, 24, 25]
561
567
  name: E2E on Node v${{ matrix.node }}
562
568
  steps:
563
569
  - name: Setup Node
@@ -660,7 +666,7 @@ jobs:
660
666
  # Install npm dependencies, cache them correctly
661
667
  # and run all Cypress tests with `quiet` parameter
662
668
  - name: Cypress run
663
- uses: ./
669
+ uses: cypress-io/github-action@v6
664
670
  with:
665
671
  working-directory: examples/quiet
666
672
  quiet: true
@@ -1163,7 +1169,7 @@ jobs:
1163
1169
 
1164
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.
1165
1171
 
1166
- 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.
1167
1173
 
1168
1174
  ```yaml
1169
1175
  name: example-basic-pnpm
@@ -1338,7 +1344,7 @@ jobs:
1338
1344
  # let's make sure our "app" works on several versions of Node
1339
1345
  strategy:
1340
1346
  matrix:
1341
- node: [20, 22, 24]
1347
+ node: [20, 22, 24, 25]
1342
1348
  name: E2E on Node v${{ matrix.node }}
1343
1349
  steps:
1344
1350
  - name: Setup Node
@@ -1372,7 +1378,7 @@ jobs:
1372
1378
  runs-on: ubuntu-24.04
1373
1379
  strategy:
1374
1380
  matrix:
1375
- node: [20, 22, 24]
1381
+ node: [20, 22, 24, 25]
1376
1382
  name: E2E on Node v${{ matrix.node }}
1377
1383
  steps:
1378
1384
  - uses: actions/setup-node@v4
@@ -1839,7 +1845,7 @@ jobs:
1839
1845
 
1840
1846
  Node.js is required to run this action. The recommended version `v6` supports:
1841
1847
 
1842
- - **Node.js** 20.x, 22.x and 24.x
1848
+ - **Node.js** 20.x, 22.x, 24.x and 25.x
1843
1849
 
1844
1850
  and is generally aligned with [Node.js's release schedule](https://github.com/nodejs/Release).
1845
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.2",
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.31.0",
56
- "@stylistic/eslint-plugin": "5.2.0",
56
+ "@eslint/js": "9.38.0",
57
+ "@stylistic/eslint-plugin": "5.5.0",
57
58
  "@types/node": "24.0.15",
58
59
  "@vercel/ncc": "0.38.1",
59
- "eslint": "9.31.0",
60
- "eslint-plugin-cypress": "5.1.0",
61
- "globals": "16.3.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.6.0"
64
+ "markdown-link-check": "3.14.1",
65
+ "prettier": "3.6.2"
65
66
  },
66
67
  "publishConfig": {
67
68
  "access": "public"