This repository has been archived by the owner on Dec 6, 2023. It is now read-only.
forked from cypress-io/github-action
-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (57 loc) · 1.96 KB
/
example-recording.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: example-recording
on:
push:
branches:
- 'master'
pull_request:
jobs:
parallel:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Cypress tests
# normally you would write
# uses: cypress-io/github-action@v2
uses: ./
# let's give this action an ID so we can refer
# to its output values later
id: cypress
# Continue the build in case of an error, as we need to set the
# commit status in the next step, both in case of success and failure
continue-on-error: true
with:
working-directory: examples/recording
record: true
parallel: true
group: Recording example
tag: action
env:
# pass the Dashboard record key as an environment variable
CYPRESS_RECORD_KEY: ${{ secrets.EXAMPLE_RECORDING_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# see "outcome" and "conclusion" of a step doc
# https://docs.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions#steps-context
# "output" can be success, failure, cancelled, or skipped
- name: Print Dashboard URL
run: |
echo Cypress finished with: ${{ steps.cypress.outcome }}
echo See results at ${{ steps.cypress.outputs.dashboardUrl }}
group:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Cypress tests
# normally you would write
# uses: cypress-io/github-action@v2
uses: ./
with:
working-directory: examples/recording
record: true
# no parallel flag, just the group name
group: Recording group
env:
# pass the Dashboard record key as an environment variable
CYPRESS_RECORD_KEY: ${{ secrets.EXAMPLE_RECORDING_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}