-
Notifications
You must be signed in to change notification settings - Fork 60
96 lines (82 loc) · 3.3 KB
/
bundler-spec-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
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
name: Skandha ERC-4337 compliance (bundler-spec-tests)
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
bundler-spec-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup PDM
run: curl -sSL https://raw.githubusercontent.com/pdm-project/pdm/main/install-pdm.py | python3 -
- name: Setup NodeJS
uses: "actions/setup-node@v3"
with:
node-version: 18.15
- name: Checkout bundler spec tests
uses: actions/checkout@v3
with:
repository: eth-infinitism/bundler-spec-tests
ref: 5b611d592fc55004d1e50fe18da6824206f1b72c
path: ./bundler-spec-tests
submodules: true
- name: Setup bundler spec tests
working-directory: ./bundler-spec-tests
run: pdm install && pdm run update-deps
- name: Install Geth
run: |
sudo add-apt-repository -y ppa:ethereum/ethereum && \
sudo apt-get update && \
sudo apt-get install ethereum
- name: Run Geth
run: |
geth \
--verbosity 1 \
--http.vhosts '*,localhost,host.docker.internal' \
--http \
--http.api personal,eth,net,web3,debug \
--http.corsdomain '*' \
--http.addr "0.0.0.0" \
--nodiscover --maxpeers 0 \
--networkid 1337 \
--dev \
--allow-insecure-unlock \
--rpc.allow-unprotected-txs \
--dev.gaslimit 20000000 &
- name: Deploy ERC-4337 contracts
working-directory: ./bundler-spec-tests
# checkout to 0.6.0 commit https://github.com/eth-infinitism/account-abstraction/commits/abff2aca61a8f0934e533d0d352978055fddbd96
# change this command when using new EP
run: |
cd @account-abstraction && \
git fetch --tags origin && \
git checkout v0.6.0 && \
yarn deploy --network localhost
- name: Fund bundler
run: |
geth \
--exec "eth.sendTransaction({from: eth.accounts[0], to: \"0x55082761664aEb8062B3427ba5E0455bFb7b68CB\", value: web3.toWei(4337, \"ether\")})" \
attach http://localhost:8545/
- name: Install Skandha deps and build
run: yarn install && yarn build && yarn run bootstrap
- name: Start Skandha
# This private key is for testing only
run: cp config.json.default config.json && jq '.networks.dev.relayer = "0x767b4393f6a5da742b30585428116f0395bee8e61c2da4ae8e67e5633389e2d3"' && ./skandha standalone --testingMode &
- name: Run tests
working-directory: ./bundler-spec-tests
run: pdm run pytest -rA -W ignore::DeprecationWarning --url http://127.0.0.1:14337/rpc/ --entry-point 0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789 --ethereum-node http://localhost:8545
- name: Send Slack notification
uses: ravsamhq/notify-slack-action@v2
if: always()
continue-on-error: true
with:
status: ${{ job.status }}
notification_title: "{workflow} has {status_message}"
message_format: "{emoji} *{workflow}* {status_message} in <{repo_url}|{repo}>"
footer: "Repo <{repo_url}|{repo}> | <{run_url}|View Workflow>"
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}