-
Notifications
You must be signed in to change notification settings - Fork 354
/
action.yml
58 lines (47 loc) · 1.53 KB
/
action.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
name: 'Cypress'
description: 'Run Cypress'
inputs:
secrets:
description: 'GitHub secrets as JSON'
required: true
spec:
description: 'A glob pattern for which tests to run'
required: true
group:
description: 'The name of the group (e.g. "smoke")'
required: true
project_id:
description: 'Cypress cloud project id'
required: false
record_key:
description: 'Cypress cloud record key'
required: false
runs:
using: 'composite'
steps:
- uses: ./.github/workflows/yarn
- name: Install Latest stable Chrome Version
shell: bash
run: |
curl -O 'https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb'
sudo apt-get install ./google-chrome-stable_current_amd64.deb
- uses: ./.github/workflows/build
with:
secrets: ${{ inputs.secrets }}
e2e_mnemonic: ${{ fromJSON(inputs.secrets).NEXT_PUBLIC_CYPRESS_MNEMONIC }}
- name: Serve
shell: bash
run: yarn serve &
- uses: cypress-io/github-action@v4
with:
spec: ${{ inputs.spec }}
group: ${{ inputs.group }}
parallel: true
browser: chrome
record: true
config: baseUrl=http://localhost:8080
env:
CYPRESS_RECORD_KEY: ${{ inputs.record_key || fromJSON(inputs.secrets).CYPRESS_RECORD_KEY }}
GITHUB_TOKEN: ${{ fromJSON(inputs.secrets).GITHUB_TOKEN }}
CYPRESS_PROJECT_ID: ${{ inputs.project_id }}
CYPRESS_WALLET_CREDENTIALS: ${{ fromJSON(inputs.secrets).CYPRESS_WALLET_CREDENTIALS }}