-
Notifications
You must be signed in to change notification settings - Fork 65
56 lines (52 loc) · 1.71 KB
/
e2e-tests.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
name: E2E tests
on:
pull_request:
types:
- opened
- reopened
- synchronize
jobs:
cypress-run:
runs-on: ubuntu-latest
environment: cypress
steps:
- name: Add SSH key to chekout a private repo
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.DEPLOY_KEY }}
- name: Checkout
uses: actions/checkout@v3
- name: Set up Node version️
uses: actions/setup-node@v3
with:
node-version: 16.x
# Set default Production env variables, such as Relayer, Velcro, etc.
- run: cat .env.production >> $GITHUB_ENV
# Install NPM dependencies, cache them correctly
# and run all Cypress tests
- name: Cypress run
uses: cypress-io/github-action@v5
with:
start: npm start
wait-on: 'http://localhost:3000'
wait-on-timeout: 240
browser: chrome
env:
CYPRESS_SELECTED_ACCOUNT: ${{ secrets.CYPRESS_SELECTED_ACCOUNT }}
CYPRESS_ACCOUNTS: ${{ secrets.CYPRESS_ACCOUNTS }}
CYPRESS_ACCOUNT_PASSWORD: ${{ secrets.CYPRESS_ACCOUNT_PASSWORD }}
CYPRESS_EMAIL_PASSWORD: ${{ secrets.CYPRESS_EMAIL_PASSWORD }}
# Upload the test Screenshots (in case of failure) as Artifact
- name: Artifacts - Screenshots
uses: actions/upload-artifact@v2
if: failure()
with:
name: cypress-screenshots
path: cypress/screenshots
# Upload the recorded test Video (in case of failure) as Artifact
- name: Artifacts - Videos
uses: actions/upload-artifact@v2
if: failure()
with:
name: cypress-videos
path: cypress/videos