fix test workflow, update fixtures

This commit is contained in:
Roy Crihfield 2024-07-07 14:34:34 +08:00
parent b2868656d9
commit ee48b656a1
4 changed files with 19 additions and 43 deletions

View File

@ -9,6 +9,9 @@ on:
- ci-test
workflow_call:
env:
ETH_TESTING_REF: v0.5.2
jobs:
integration-tests:
name: Run integration tests
@ -29,16 +32,15 @@ jobs:
with:
repository: cerc-io/eth-testing
path: ./fixtures
ref: v0.4.0
ref: ${{ env.ETH_TESTING_REF }}
# Run a sanity test against the fixture data
# Complete integration tests are TODO
- name: Run basic integration test
env:
DATABASE_TYPE: postgres
ETHDB_PATH: ./fixtures/chaindata/_data/small2
ETHDB_ANCIENT: ./fixtures/chaindata/_data/small2/ancient
ETHDB_PATH: ./fixtures/chains/data/premerge2/geth/chaindata
ETH_CHAIN_CONFIG: ./fixtures/chains/data/premerge2/genesis.config.json
ETH_GENESIS_BLOCK: 0x8a3c7cddacbd1ab4ec1b03805fa2a287f3a75e43d87f4f987fcc399f5c042614
LOG_FILE: ./server-log
ETH_GENESIS_BLOCK: "0x8a3c7cddacbd1ab4ec1b03805fa2a287f3a75e43d87f4f987fcc399f5c042614"
timeout-minutes: 20
run: |
./eth-statediff-service --config ./test/ci-config.toml serve &
@ -72,12 +74,6 @@ jobs:
with:
go-version-file: ./eth-statediff-service/go.mod
check-latest: true
- name: Install test fixtures
uses: actions/checkout@v3
with:
repository: cerc-io/eth-testing
path: ./fixtures
ref: v0.4.0
- name: Build current version
working-directory: ./eth-statediff-service
run: go build -o ../service-current .
@ -91,22 +87,28 @@ jobs:
working-directory: ./eth-statediff-service-canonical
run: go build -o ../service-canonical .
- name: Install test fixtures
uses: actions/checkout@v3
with:
repository: cerc-io/eth-testing
path: ./fixtures
ref: ${{ env.ETH_TESTING_REF }}
- name: Run DB container
working-directory: ./eth-statediff-service
run: docker compose -f test/compose.yml up --wait
- name: Compare statediff output
timeout-minutes: 10
env:
ETHDB_PATH: ./fixtures/chaindata/_data/small2
ETHDB_ANCIENT: ./fixtures/chaindata/_data/small2/ancient
ETHDB_PATH: ./fixtures/chains/data/premerge2/geth/chaindata
ETHDB_ANCIENT: ./fixtures/chains/data/premerge2/geth/chaindata/ancient
ETH_CHAIN_CONFIG: ./fixtures/chains/data/premerge2/genesis.config.json
ETH_GENESIS_BLOCK: "0x8a3c7cddacbd1ab4ec1b03805fa2a287f3a75e43d87f4f987fcc399f5c042614"
ETH_CHAIN_CONFIG: ./eth-statediff-service/test/ci-chain.json
run: |
until
ready_query='select max(version_id) from goose_db_version;'
version=$(docker exec -e PGPASSWORD=password test-ipld-eth-db-1 \
psql -tA cerc_testing -U vdbm -c "$ready_query")
[[ "$version" -ge 18 ]]
[[ "$version" -ge 21 ]]
do sleep 1; done
./eth-statediff-service/scripts/compare-statediffs.sh \

View File

@ -1,21 +0,0 @@
{
"chainId": 1212,
"homesteadBlock": 0,
"eip150Block": 0,
"eip150Hash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"eip155Block": 0,
"eip158Block": 0,
"byzantiumBlock": 0,
"constantinopleBlock": 0,
"petersburgBlock": 0,
"istanbulBlock": 0,
"berlinBlock": 0,
"londonBlock": 0,
"mergeForkBlock": 0,
"terminalTotalDifficulty": 0,
"mergeNetsplitBlock": 0,
"clique": {
"period": 5,
"epoch": 30000
}
}

View File

@ -1,8 +1,4 @@
# Config file for service in compose.yml
# [ethdb]
# mode = "local"
# url = "http://127.0.0.1:8082/"
# Config file for github workflow
[server]
ipcPath = ".ipc"
@ -30,7 +26,6 @@
trie = 1024
[ethereum]
chainConfig = "test/ci-chain.json"
nodeID = "test-node"
clientName = "test-eth-statediff-service"
networkID = "test-network"

View File

@ -3,7 +3,7 @@ services:
restart: on-failure
depends_on:
- ipld-eth-db
image: git.vdb.to/cerc-io/ipld-eth-db/ipld-eth-db:v5.0.5-alpha
image: git.vdb.to/cerc-io/ipld-eth-db/ipld-eth-db:v5.3.0-alpha
environment:
DATABASE_USER: "vdbm"
DATABASE_NAME: "cerc_testing"