@cypress/github-action 6.7.1 → 6.7.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 +34 -3
  2. package/dist/index.js +14 -5
  3. package/package.json +6 -6
package/README.md CHANGED
@@ -243,6 +243,28 @@ Replace the `latest` tag with a specific version image tag from [`cypress/browse
243
243
 
244
244
  Include `options: --user 1001` to avoid permissions issues.
245
245
 
246
+ When using [cypress/included](https://github.com/cypress-io/cypress-docker-images/tree/master/included) Docker images, set the environment variable `CYPRESS_INSTALL_BINARY=0` to suppress saving the Cypress binary cache, otherwise cache restore errors may occur. The example below shows how to do this:
247
+
248
+ ```yml
249
+ name: Test with Docker cypress/included
250
+ on: push
251
+ jobs:
252
+ cypress-run:
253
+ runs-on: ubuntu-22.04
254
+ container:
255
+ # Cypress Docker image from https://hub.docker.com/r/cypress/included
256
+ # with Cypress globally pre-installed
257
+ image: cypress/included:latest
258
+ options: --user 1001
259
+ steps:
260
+ - uses: actions/checkout@v4
261
+ - uses: cypress-io/github-action@v6
262
+ with:
263
+ browser: chrome
264
+ env:
265
+ CYPRESS_INSTALL_BINARY: 0
266
+ ```
267
+
246
268
  Refer to [cypress-io/cypress-docker-images](https://github.com/cypress-io/cypress-docker-images) for further information about using Cypress Docker images. Cypress offers the [Cypress Docker Factory](https://github.com/cypress-io/cypress-docker-images/tree/master/factory) to generate additional Docker images with selected components and versions.
247
269
 
248
270
  [![Docker example](https://github.com/cypress-io/github-action/actions/workflows/example-docker.yml/badge.svg)](.github/workflows/example-docker.yml)
@@ -1105,7 +1127,8 @@ jobs:
1105
1127
  ### pnpm
1106
1128
 
1107
1129
  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.
1108
- At this time, the action does not automatically cache dependencies installed by pnpm. We advise against attempting to work around this restriction, by caching the pnpm store directory through additional workflow steps, as this can lead to the action skipping installation of the Cypress binary, causing workflow failure.
1130
+
1131
+ 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).
1109
1132
 
1110
1133
  ```yaml
1111
1134
  name: example-basic-pnpm
@@ -1117,7 +1140,15 @@ jobs:
1117
1140
  - name: Checkout
1118
1141
  uses: actions/checkout@v4
1119
1142
  - name: Install pnpm
1120
- run: npm install -g pnpm@9
1143
+ uses: pnpm/action-setup@v4
1144
+ with:
1145
+ version: 9
1146
+ - name: Install Node.js
1147
+ uses: actions/setup-node@v4
1148
+ with:
1149
+ node-version: 20
1150
+ cache: 'pnpm'
1151
+ cache-dependency-path: examples/basic-pnpm/pnpm-lock.yaml
1121
1152
  - name: Cypress run
1122
1153
  uses: cypress-io/github-action@v6
1123
1154
  with:
@@ -1148,7 +1179,7 @@ If you are using [pnpm workspaces](https://pnpm.io/workspaces) you need to insta
1148
1179
 
1149
1180
  [![pnpm workspaces example](https://github.com/cypress-io/github-action/actions/workflows/example-start-and-pnpm-workspaces.yml/badge.svg)](.github/workflows/example-start-and-pnpm-workspaces.yml)
1150
1181
 
1151
- See the example project [start-and-pnpm-workspaces](examples/start-and-pnpm-workspaces/) and the [example-start-and-pnpm-workspaces.yml](.github/workflows/example-start-and-pnpm-workspaces.yml) workflow for a full working example including pnpm caching.
1182
+ See the example project [start-and-pnpm-workspaces](examples/start-and-pnpm-workspaces/) and the [example-start-and-pnpm-workspaces.yml](.github/workflows/example-start-and-pnpm-workspaces.yml) workflow for a full working example.
1152
1183
 
1153
1184
  ### Yarn Classic
1154
1185
 
package/dist/index.js CHANGED
@@ -48689,6 +48689,8 @@ function useColors() {
48689
48689
  return false;
48690
48690
  }
48691
48691
 
48692
+ let m;
48693
+
48692
48694
  // Is webkit? http://stackoverflow.com/a/16459606/376773
48693
48695
  // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
48694
48696
  return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||
@@ -48696,7 +48698,7 @@ function useColors() {
48696
48698
  (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||
48697
48699
  // Is firefox >= v31?
48698
48700
  // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
48699
- (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||
48701
+ (typeof navigator !== 'undefined' && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m[1], 10) >= 31) ||
48700
48702
  // Double check webkit in userAgent just in case we are in a worker
48701
48703
  (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));
48702
48704
  }
@@ -49325,11 +49327,11 @@ function getDate() {
49325
49327
  }
49326
49328
 
49327
49329
  /**
49328
- * Invokes `util.format()` with the specified arguments and writes to stderr.
49330
+ * Invokes `util.formatWithOptions()` with the specified arguments and writes to stderr.
49329
49331
  */
49330
49332
 
49331
49333
  function log(...args) {
49332
- return process.stderr.write(util.format(...args) + '\n');
49334
+ return process.stderr.write(util.formatWithOptions(exports.inspectOpts, ...args) + '\n');
49333
49335
  }
49334
49336
 
49335
49337
  /**
@@ -55840,7 +55842,12 @@ const util = __nccwpck_require__(3837);
55840
55842
  const braces = __nccwpck_require__(610);
55841
55843
  const picomatch = __nccwpck_require__(8569);
55842
55844
  const utils = __nccwpck_require__(479);
55843
- const isEmptyString = val => val === '' || val === './';
55845
+
55846
+ const isEmptyString = v => v === '' || v === './';
55847
+ const hasBraces = v => {
55848
+ const index = v.indexOf('{');
55849
+ return index > -1 && v.indexOf('}', index) > -1;
55850
+ };
55844
55851
 
55845
55852
  /**
55846
55853
  * Returns an array of strings that match one or more glob patterns.
@@ -56281,7 +56288,7 @@ micromatch.parse = (patterns, options) => {
56281
56288
 
56282
56289
  micromatch.braces = (pattern, options) => {
56283
56290
  if (typeof pattern !== 'string') throw new TypeError('Expected a string');
56284
- if ((options && options.nobrace === true) || !/\{.*\}/.test(pattern)) {
56291
+ if ((options && options.nobrace === true) || !hasBraces(pattern)) {
56285
56292
  return [pattern];
56286
56293
  }
56287
56294
  return braces(pattern, options);
@@ -56300,6 +56307,8 @@ micromatch.braceExpand = (pattern, options) => {
56300
56307
  * Expose micromatch
56301
56308
  */
56302
56309
 
56310
+ // exposed for tests
56311
+ micromatch.hasBraces = hasBraces;
56303
56312
  module.exports = micromatch;
56304
56313
 
56305
56314
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cypress/github-action",
3
- "version": "6.7.1",
3
+ "version": "6.7.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
  },
20
20
  "repository": {
21
21
  "type": "git",
22
- "url": "https://github.com/cypress-io/github-action.git"
22
+ "url": "git+https://github.com/cypress-io/github-action.git"
23
23
  },
24
24
  "keywords": [
25
25
  "actions",
@@ -38,7 +38,7 @@
38
38
  "@actions/io": "1.1.3",
39
39
  "@octokit/core": "4.2.0",
40
40
  "argument-vector": "1.0.2",
41
- "debug": "4.3.4",
41
+ "debug": "4.3.6",
42
42
  "find-yarn-workspace-root": "2.0.0",
43
43
  "got": "11.8.6",
44
44
  "hasha": "5.2.2",
@@ -46,11 +46,11 @@
46
46
  "supports-color": "9.3.1"
47
47
  },
48
48
  "devDependencies": {
49
- "@types/node": "20.14.2",
49
+ "@types/node": "20.16.1",
50
50
  "@vercel/ncc": "0.38.1",
51
- "husky": "9.0.11",
51
+ "husky": "9.1.5",
52
52
  "markdown-link-check": "3.12.2",
53
- "prettier": "3.3.1"
53
+ "prettier": "3.3.3"
54
54
  },
55
55
  "publishConfig": {
56
56
  "access": "public"