-
Notifications
You must be signed in to change notification settings - Fork 5
75 lines (73 loc) · 2.26 KB
/
end2end-test.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
72
73
74
75
name: Integration Test
on:
push:
branches: ['main', 'master']
pull_request:
workflow_dispatch:
jobs:
e2e-test:
name: Playwright Test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node 16
uses: actions/setup-node@v4
with:
node-version: 16.17.0
cache: 'yarn'
- name: Install linux deps (xvfb / fluxbox)
run: |
sudo apt-get install --no-install-recommends -y \
fluxbox \
xvfb
- name: Install yarn dependencies
run: yarn
- name: Build Gateway Project
working-directory: ./
run: |
yarn && yarn build:prod
env:
REACT_APP_POLL_INTERVAL: 15000
REACT_APP_GAS_POLL_INTERVAL: 30000
SKIP_PREFLIGHT_CHECK: true
REACT_APP_WALLET_VERSION: 0.14.9
REACT_APP_ENV: local
REACT_APP_ENABLE_ANCHORAGE: true
REACT_APP_WC_PROJECT_ID: ${{secrets.WC_PROJECT_ID}}
REACT_APP_GA4_MEASUREMENT_ID: ${{secrets.GA4_MEASUREMENT_ID}}
REACT_APP_SENTRY_DSN: ${{secrets.SENTRY_DSN}}
- name: Setup Node 18
uses: actions/setup-node@v4
with:
node-version: 18
- name: Install PNPM deps e2e-tests
working-directory: ./e2e-tests
run: |
npm install -g pnpm && pnpm install --frozen-lockfile && npx playwright install
- name: Install Playwright Browsers
run: npx playwright install --with-deps chromium
- name: Run e2e test (headful)
working-directory: ./e2e-tests
run: |
Xvfb :0 -screen 0 1920x1080x24 -listen tcp -ac &
fluxbox &
pnpm start:server &
pnpm test
env:
PASSWORD: ${{secrets.PASSWORD}}
NETWORK: 'sepolia'
SECRET_WORDS: ${{secrets.SECRET_WORDS}}
METAMASK_VERSION: 10.25.0
DISPLAY: :0.0
- name: Upload Archive e2e artifacts
uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: e2e-reports
retention-days: 3
path: |
./e2e-tests/videos/
./e2e-tests/playwright-report/
./e2e-tests/test-results/
continue-on-error: true