-
Notifications
You must be signed in to change notification settings - Fork 10
71 lines (63 loc) · 2.24 KB
/
test_integration_cypress.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
62
63
64
65
66
67
68
69
70
71
name: Integration Test [Cypress]
run-name: Integration Test on ${{ inputs.network ||'sanchonet' }} [${{ inputs.deployment || 'staging.govtool.byron.network' }}]
on:
push:
branches: [feat/integration-test]
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
inputs:
network:
required: true
type: choice
default: "sanchonet"
options:
- "sanchonet"
deployment:
required: true
type: choice
default: "staging.govtool.byron.network"
options:
- "sanchogov.tools"
- "staging.govtool.byron.network"
- "govtool-sanchonet.cardanoapi.io"
jobs:
cypress-tests:
defaults:
run:
working-directory: ./tests/govtool-frontend
runs-on: ubuntu-latest
env:
NODE_OPTIONS: --max_old_space_size=4096
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: 16
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
id: yarn-cache
with:
path: |
${{ steps.yarn-cache-dir-path.outputs.dir }}
key:
${{ runner.os }}-yarn-${{hashFiles('tests/govtool-frontend/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Cypress run
uses: cypress-io/github-action@v6
with:
record: true
working-directory: ./tests/govtool-frontend
env:
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
# pass GitHub token to allow accurately detecting a build vs a re-run build
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CYPRESS_baseUrl: https://${{inputs.deployment || 'staging.govtool.byron.network' }}
CYPRESS_apiUrl: https://${{ inputs.deployment || 'staging.govtool.byron.network' }}/api
CYPRESS_kuberApiUrl: https://${{ inputs.network || 'sanchonet' }}.kuber.cardanoapi.io
CYPRESS_kuberApiKey: ${{secrets.KUBER_API_KEY}}
CYPRESS_faucetApiUrl: https://faucet.${{inputs.network || 'sanchonet'}}.world.dev.cardano.org
CYPRESS_faucetApiKey: ${{ secrets.FAUCET_API_KEY }}