@cypress/github-action 7.2.0 → 7.4.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.
package/README.md CHANGED
@@ -37,6 +37,7 @@ The following examples demonstrate the actions' functions.
37
37
  - using [headed mode](#headed)
38
38
  - Using [Docker image](#docker-image)
39
39
  - Specify [environment variables](#env)
40
+ - Specify [expose variables](#expose)
40
41
  - Run only some [spec files](#specs)
41
42
  - Test [project in subfolder](#project)
42
43
  - [Record results](#record-test-results-on-cypress-cloud) on Cypress Cloud
@@ -358,6 +359,30 @@ For more examples, see the workflows below, using environment variables for [rec
358
359
 
359
360
  [![Env example](https://github.com/cypress-io/github-action/actions/workflows/example-env.yml/badge.svg)](.github/workflows/example-env.yml)
360
361
 
362
+ ### Expose
363
+
364
+ Specify the expose argument with `expose` parameter. Expose variables are for non-sensitive, public config values that are synchronous and exposed to the browser (requires Cypress 15.10.0 or later).
365
+
366
+ ```yml
367
+ name: Cypress tests
368
+ on: push
369
+ jobs:
370
+ cypress-run:
371
+ runs-on: ubuntu-24.04
372
+ steps:
373
+ - name: Checkout
374
+ uses: actions/checkout@v6
375
+
376
+ - name: Cypress run with expose
377
+ uses: cypress-io/github-action@v7
378
+ with:
379
+ expose: host=api.dev.local,port=4222
380
+ ```
381
+
382
+ For more information, see [Cypress.expose()](https://docs.cypress.io/api/cypress-api/expose) in the Cypress documentation.
383
+
384
+ [![Expose example](https://github.com/cypress-io/github-action/actions/workflows/example-expose.yml/badge.svg)](.github/workflows/example-expose.yml)
385
+
361
386
  ### Specs
362
387
 
363
388
  Specify the [spec files to run](https://docs.cypress.io/guides/guides/command-line.html#cypress-run-spec-lt-spec-gt) with `spec` parameter
@@ -567,7 +592,7 @@ jobs:
567
592
  node:
568
593
  - 22
569
594
  - 24
570
- - 25
595
+ - 26
571
596
  name: E2E on Node v${{ matrix.node }}
572
597
  steps:
573
598
  - name: Checkout
@@ -1189,9 +1214,9 @@ jobs:
1189
1214
  - name: Checkout
1190
1215
  uses: actions/checkout@v6
1191
1216
  - name: Install pnpm
1192
- uses: pnpm/action-setup@v5
1217
+ uses: pnpm/action-setup@v6
1193
1218
  with:
1194
- version: 10
1219
+ version: 11
1195
1220
  - name: Install Node.js
1196
1221
  uses: actions/setup-node@v6
1197
1222
  with:
@@ -1392,7 +1417,7 @@ jobs:
1392
1417
  node:
1393
1418
  - 22
1394
1419
  - 24
1395
- - 25
1420
+ - 26
1396
1421
  name: E2E on Node v${{ matrix.node }}
1397
1422
  steps:
1398
1423
  - name: Checkout
@@ -1429,7 +1454,7 @@ jobs:
1429
1454
  node:
1430
1455
  - 22
1431
1456
  - 24
1432
- - 25
1457
+ - 26
1433
1458
  name: E2E on Node v${{ matrix.node }}
1434
1459
  steps:
1435
1460
  - uses: actions/checkout@v6
@@ -1619,6 +1644,7 @@ jobs:
1619
1644
  | `--config-file`, `-C` | [`config-file`](#config-file) | Specify configuration file |
1620
1645
  | `--e2e` | [`component: false`](#component-testing) (default) | Run end to end tests |
1621
1646
  | `--env`, `-e` | [`env`](#env) | Specify environment variables |
1647
+ | `--expose`, `-x` | [`expose`](#expose) | Specify expose variables for non-sensitive, public config values |
1622
1648
  | `--group` | [`group`](#parallel) | Group recorded tests together under a single run for Cloud recording |
1623
1649
  | `--headed` | [`headed`](#headed) | Display the browser instead of running headlessly |
1624
1650
  | `--headless` | [`headed: false`](#headed) (default) | Hide the browser instead of running headed |
@@ -1896,7 +1922,7 @@ jobs:
1896
1922
 
1897
1923
  Node.js is required to run this action. The recommended version `v7` supports:
1898
1924
 
1899
- - **Node.js** 22.x, 24.x and 25.x
1925
+ - **Node.js** 22.x, 24.x and 26.x
1900
1926
 
1901
1927
  and is generally aligned with [Node.js's release schedule](https://github.com/nodejs/Release#readme).
1902
1928
 
package/action.yml CHANGED
@@ -29,6 +29,9 @@ inputs:
29
29
  env:
30
30
  description: 'Sets Cypress environment variables'
31
31
  required: false
32
+ expose:
33
+ description: 'Sets Cypress expose variables for non-sensitive, public config values (requires Cypress 15.10.0 or later)'
34
+ required: false
32
35
  group:
33
36
  description: 'Group setting for recording tests'
34
37
  required: false
package/dist/index.js CHANGED
@@ -102320,6 +102320,12 @@ const runTestsUsingCommandLine = async () => {
102320
102320
  cmd.push(envInput)
102321
102321
  }
102322
102322
 
102323
+ const exposeInput = core.getInput('expose')
102324
+ if (exposeInput) {
102325
+ cmd.push('--expose')
102326
+ cmd.push(exposeInput)
102327
+ }
102328
+
102323
102329
  const quiet = getInputBool('quiet')
102324
102330
  if (quiet) {
102325
102331
  cmd.push('--quiet')
@@ -102360,6 +102366,7 @@ const commandIgnoredStringInputs = [
102360
102366
  'config',
102361
102367
  'config-file',
102362
102368
  'env',
102369
+ 'expose',
102363
102370
  'group',
102364
102371
  'project',
102365
102372
  'spec',
@@ -102383,7 +102390,9 @@ const validateCustomCommand = () => {
102383
102390
  })
102384
102391
  if (ignoredInputParameters.length > 0) {
102385
102392
  core.warning(
102386
- `command parameter is used and the following other parameters are ignored: ${ignoredInputParameters.sort().join(', ')}.`
102393
+ `command parameter is used and the following other parameters are ignored: ${ignoredInputParameters
102394
+ .sort()
102395
+ .join(', ')}.`
102387
102396
  )
102388
102397
  }
102389
102398
  }
@@ -102479,6 +102488,10 @@ const runTests = async () => {
102479
102488
  cypressOptions.env = core.getInput('env')
102480
102489
  }
102481
102490
 
102491
+ if (core.getInput('expose')) {
102492
+ cypressOptions.expose = core.getInput('expose')
102493
+ }
102494
+
102482
102495
  if (cypressOptions.parallel || cypressOptions.group) {
102483
102496
  const { branch, buildId } = await getCiBuildId()
102484
102497
  if (branch) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cypress/github-action",
3
- "version": "7.2.0",
3
+ "version": "7.4.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",