Skip to content

Commit

Permalink
Merge pull request #56 from etherspot/feature/bundler-spec-tests-and-…
Browse files Browse the repository at this point in the history
…arm-support [ci skip]

Add bundler spec tests pipeline and support for arm64 arch docker image [ci skip]
  • Loading branch information
arddluma authored Jul 21, 2023
2 parents 90dc5fc + d8534a2 commit 0603e9e
Show file tree
Hide file tree
Showing 2 changed files with 98 additions and 0 deletions.
94 changes: 94 additions & 0 deletions .github/workflows/bundler-spec-tests.yml
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 }}
4 changes: 4 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ jobs:
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
Expand All @@ -30,6 +33,7 @@ jobs:
uses: docker/build-push-action@v4
with:
context: .
platforms: linux/amd64,linux/arm64
file: ./Dockerfile
push: true
tags: |
Expand Down

0 comments on commit 0603e9e

Please sign in to comment.