-
Notifications
You must be signed in to change notification settings - Fork 1.3k
61 lines (48 loc) · 1.65 KB
/
e2e-tests.yml
File metadata and controls
61 lines (48 loc) · 1.65 KB
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
name: E2E Tests
on:
push:
branches: [master]
pull_request:
branches: [master]
permissions:
contents: read
jobs:
e2e:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
- name: Set E2E env variables
working-directory: apps/web
run: |
echo "NODE_ENV=development" > .env
echo "E2E_TEST_SEED_PHRASE=test test test test test test test test test test test junk" >> .env
echo "E2E_TEST_FORK_URL=https://mainnet.base.org" >> .env
echo "E2E_TEST_FORK_BLOCK_NUMBER=31397553" >> .env
echo "E2E_TEST=true" >> .env
echo "TEST_BASENAME=testbasename123" >> .env
echo "NEXT_PUBLIC_CDP_BASE_RPC_ENDPOINT=http://localhost:8545/" >> .env
echo "NEXT_PUBLIC_E2E_TEST=true" >> .env
- name: Install dependencies
run: yarn
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1.4.0
- name: Prepare MetaMask extension
run: yarn e2e:metamask:prepare
- name: Install Playwright browsers
run: yarn playwright install --with-deps
- name: Install xvfb
run: sudo apt-get update && sudo apt-get install -y xvfb
- name: Build application
run: yarn build
- name: Run E2E tests
env:
NODE_OPTIONS: '--dns-result-order=ipv4first'
run: xvfb-run --auto-servernum --server-args="-screen 0 1920x1080x24" yarn test:e2e