This repository has been archived by the owner on Oct 20, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 133
115 lines (96 loc) · 3.13 KB
/
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
name: E2E
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
lint:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./e2e
steps:
- uses: actions/checkout@v3
- name: Use Node.js
uses: "actions/setup-node@v3"
with:
node-version: 18.15
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Lint
run: yarn run lint
- name: Code format
run: yarn run prettier
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js
uses: "actions/setup-node@v3"
with:
node-version: 18.15
- name: Use Go
uses: actions/setup-go@v3
with:
go-version: "1.20"
cache: true
- name: Checkout account-abstraction
uses: actions/checkout@v3
with:
repository: stackup-wallet/account-abstraction
# TODO: Remove this with userop.js v0.4 (updated to latest SimpleAccount).
ref: ecb25e2d02ba929529936b793c0efa4242f96d03
path: ./account-abstraction
- name: Checkout contracts
uses: actions/checkout@v3
with:
repository: stackup-wallet/contracts
path: ./contracts
submodules: true
- name: Run Geth
run: |
docker run -d --name node -p 8545:8545 \
stackupwallet/go-ethereum:v1.13.11 \
--verbosity 1 \
--http.vhosts '*,localhost,host.docker.internal' \
--http \
--http.api eth,net,web3,debug \
--http.corsdomain '*' \
--http.addr "0.0.0.0" \
--nodiscover --maxpeers 0 --mine \
--networkid 1337 \
--dev \
--allow-insecure-unlock \
--rpc.allow-unprotected-txs \
--miner.gaslimit 12000000
- name: Install all dependencies
run: |
go mod download && \
cd ./e2e && \
yarn install --frozen-lockfile && \
cd ../account-abstraction && \
yarn install --frozen-lockfile && \
cd ../contracts && \
yarn install --frozen-lockfile
- name: Build bundler binary
run: go build -o ./tmp/stackup-bundler main.go
- name: Deploy contracts
run: |
cd ./account-abstraction && \
yarn deploy --network localhost && \
cd ../contracts && \
cp .env.example .env && \
yarn deploy:AllTest --network localhost
- name: Run Stackup Bundler
run: ./tmp/stackup-bundler start --mode private &
env:
ERC4337_BUNDLER_ETH_CLIENT_URL: http://localhost:8545/
ERC4337_BUNDLER_DEBUG_MODE: true
ERC4337_BUNDLER_NATIVE_BUNDLER_COLLECTOR_TRACER: bundlerCollectorTracer
ERC4337_BUNDLER_NATIVE_BUNDLER_EXECUTOR_TRACER: bundlerExecutorTracer
# This key is for testing purposes only. Do not use for anything else.
ERC4337_BUNDLER_PRIVATE_KEY: c6cbc5ffad570fdad0544d1b5358a36edeb98d163b6567912ac4754e144d4edb
- name: Run test
working-directory: ./e2e
run: yarn test