@cypress/github-action 2.11.6 → 3.0.1

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 (4) hide show
  1. package/README.md +29 -3
  2. package/action.yml +1 -1
  3. package/dist/index.js +22154 -26019
  4. package/package.json +10 -10
package/README.md CHANGED
@@ -315,6 +315,32 @@ jobs:
315
315
 
316
316
  **Tip 3:** if running on `pull_request` event, the commit message is "merge SHA into SHA", which is not what you want probably. You can overwrite the commit message sent to the Dashboard by setting an environment variable. See [issue 124](https://github.com/cypress-io/github-action/issues/124#issuecomment-653180260) for details.
317
317
 
318
+ **Tip 4:** to record the project needs `projectId`. Typically this value is saved in the `cypress.json` file. If you want to avoid this, pass the project id using an environment variable:
319
+
320
+ ```yml
321
+ name: Cypress tests
322
+ on: [push]
323
+ jobs:
324
+ cypress-run:
325
+ name: Cypress run
326
+ runs-on: ubuntu-20.04
327
+ steps:
328
+ - name: Checkout
329
+ uses: actions/checkout@v2
330
+
331
+ - name: Cypress run
332
+ uses: cypress-io/github-action@v2
333
+ with:
334
+ record: true
335
+ env:
336
+ # pass the Dashboard record key as an environment variable
337
+ CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
338
+ # pass GitHub token to allow accurately detecting a build vs a re-run build
339
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
340
+ # pass the project ID from the secrets through environment variable
341
+ CYPRESS_PROJECT_ID: ${{ secrets.PROJECT_ID }}
342
+ ```
343
+
318
344
  ### Quiet flag
319
345
 
320
346
  You can provide `quiet` flag for cypress run to silence any Cypress specific output from stdout
@@ -400,13 +426,13 @@ jobs:
400
426
  # thus we store screenshots only on failures
401
427
  # Alternative: create and commit an empty cypress/screenshots folder
402
428
  # to always have something to upload
403
- - uses: actions/upload-artifact@v1
429
+ - uses: actions/upload-artifact@v2
404
430
  if: failure()
405
431
  with:
406
432
  name: cypress-screenshots
407
433
  path: cypress/screenshots
408
434
  # Test run video was always captured, so this action uses "always()" condition
409
- - uses: actions/upload-artifact@v1
435
+ - uses: actions/upload-artifact@v2
410
436
  if: always()
411
437
  with:
412
438
  name: cypress-videos
@@ -729,7 +755,7 @@ steps:
729
755
  uses: actions/checkout@v2
730
756
 
731
757
  - name: Custom tests 🧪
732
- uses: cypress-io/github-action@v1
758
+ uses: cypress-io/github-action@v2
733
759
  with:
734
760
  command: npm run e2e:ci
735
761
  ```
package/action.yml CHANGED
@@ -84,7 +84,7 @@ outputs:
84
84
  dashboardUrl:
85
85
  description: 'Cypress Dashboard URL if the run was recorded'
86
86
  runs:
87
- using: 'node12'
87
+ using: 'node16'
88
88
  main: 'dist/index.js'
89
89
  branding:
90
90
  color: 'green'