-
Notifications
You must be signed in to change notification settings - Fork 6
63 lines (54 loc) · 1.49 KB
/
test.e2e.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
name: E2E Tests
on:
schedule:
- cron: '0 0 * * *'
push:
branches:
- 'develop'
- 'staging'
- 'v**'
pull_request:
jobs:
e2e_tests:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Node.js
uses: actions/setup-node@v2-beta
with:
node-version: 16
- name: Cypress install
uses: cypress-io/github-action@v4
with:
runTests: false
- name: Cypress info
run: npx cypress info
- name: Cypress run
uses: cypress-io/[email protected]
with:
install: false
build: npm run build
start: npm start
wait-on: 'http://localhost:3000'
wait-on-timeout: 120
config-file: cypress.json
command: npm run cypress:run
env:
NEXT_PUBLIC_SERVER_ENDPOINT: ${{ secrets.NEXT_PUBLIC_SERVER_ENDPOINT_FOR_E2E }}
NEXT_PUBLIC_WS_URL: ${{ secrets.NEXT_PUBLIC_WS_URL }}
NEXT_PUBLIC_CHAIN_TYPE: ${{ secrets.NEXT_PUBLIC_CHAIN_TYPE }}
- uses: actions/upload-artifact@v3
if: failure()
with:
name: cypress-screenshots
path: cypress/screenshots
- uses: actions/upload-artifact@v3
if: always()
with:
name: cypress-videos
path: cypress/videos
- name: Upload Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}