Merge pull request #11 from flashbots/feat/suave-geth-image

Add integration tests.
This commit is contained in:
Louis Thibault 2024-02-01 22:38:53 +01:00 committed by GitHub
commit 4ba5e17332
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 110 additions and 0 deletions

View file

@ -26,3 +26,19 @@ jobs:
go-version: ${{ matrix.go-version }} go-version: ${{ matrix.go-version }}
- name: Run unit tests - name: Run unit tests
run: go test -short ./accounts ./cmd/geth ./core ./core/types ./core/vm ./eth/... ./internal/ethapi/... ./miner ./params ./suave/... run: go test -short ./accounts ./cmd/geth ./core ./core/types ./core/vm ./eth/... ./internal/ethapi/... ./miner ./params ./suave/...
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v3
with:
go-version: ^1.21
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Build
run: make geth

View file

@ -0,0 +1,42 @@
name: Integration examples
on:
push:
branches: [main]
pull_request:
jobs:
suapp-examples:
name: Devenv
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v3
with:
go-version: 1.21
id: go
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Run dev environment
run: docker-compose -f ./suave/devenv/docker-compose.yml up -d --build
- name: Check out suapp-examples
uses: actions/checkout@v2
with:
repository: flashbots/suapp-examples
path: suapp-examples
- name: Build suapp-examples
run: |
cd suapp-examples
forge build
- name: Run suapp-examples
run: |
cd suapp-examples
make run-integration

View file

@ -37,6 +37,15 @@ devtools:
@type "solc" 2> /dev/null || echo 'Please install solc' @type "solc" 2> /dev/null || echo 'Please install solc'
@type "protoc" 2> /dev/null || echo 'Please install protoc' @type "protoc" 2> /dev/null || echo 'Please install protoc'
devnet-up:
docker-compose -f ./suave/devenv/docker-compose.yml up -d --build
devnet-down:
docker-compose -f ./suave/devenv/docker-compose.yml down
fmt-contracts:
cd suave && forge fmt
release: release:
docker run \ docker run \
--rm \ --rm \

6
suave/devenv/README.md Normal file
View file

@ -0,0 +1,6 @@
## Run the devnet:
`docker-compose up --build --force-recreate`
## Genesis info
Execution node's address: 0xb5feafbdd752ad52afb7e1bd2e40432a485bbb7f (private key: 6c45335a22461ccdb978b78ab61b238bad2fae4544fb55c14eb096c875ccfc52)
Pre-funded private key: 0x91ab9a7e53c220e6210460b65a7a3bb2ca181412a8a7b43ff336b3df1737ce12, Address: 0xBE69d72ca5f88aCba033a063dF5DBe43a4148De0

View file

@ -0,0 +1,36 @@
version: "3.8"
services:
suave-mevm:
image: flashbots/suave-geth:latest
command:
- --dev
- --dev.gaslimit=30000000
- --http
- --http.port=8545
- --http.addr=0.0.0.0
- --http.vhosts=*
- --http.corsdomain=*
- --ws
- --ws.origins=*
- --ws.addr=0.0.0.0
- --datadir=/data
- --keystore=/keystore/keystore
- --unlock=0xB5fEAfbDD752ad52Afb7e1bD2E40432A485bBB7F
- --password=/keystore/password.txt
depends_on:
- suave-enabled-chain
volumes:
- ./suave-ex-node:/keystore
ports:
- 8545:8545
- 8546:8546
suave-enabled-chain:
build: ../..
command:
- --dev
- --dev.gaslimit=30000000
- --http
- --ws
ports:
- 8555:8545

View file

@ -0,0 +1 @@
{"address":"b5feafbdd752ad52afb7e1bd2e40432a485bbb7f","crypto":{"cipher":"aes-128-ctr","ciphertext":"8075ff2ed17c6cf6cd162b4bdd2926034e2067f03055990d57510e5d807ef06e","cipherparams":{"iv":"8c31b77d9518a68fda4aa6c90d62562d"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"6e55b1eea32430c4dc0b87cfc31168d552249b8ba946314e3c41dbeaeed3d125"},"mac":"5e411244fd732deb4464d247cfeb9beadc8a37558f12720c4d2ee8691436c50c"},"id":"51d12702-2276-44a9-972e-2011c56edf4e","version":3}

View file