-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #56 from etherspot/feature/bundler-spec-tests-and-…
…arm-support [ci skip] Add bundler spec tests pipeline and support for arm64 arch docker image [ci skip]
- Loading branch information
Showing
2 changed files
with
98 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
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 | ||
with: | ||
repository: etherspot/skandha | ||
ref: some-fixes | ||
|
||
- 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: master | ||
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 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 \ | ||
--dev.gaslimit 20000000 & | ||
- name: Deploy ERC-4337 contracts | ||
working-directory: ./bundler-spec-tests | ||
run: | | ||
cd @account-abstraction && \ | ||
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 --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() | ||
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 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters