fix test workflow, update fixtures
This commit is contained in:
parent
b2868656d9
commit
ee48b656a1
@ -9,6 +9,9 @@ on:
|
|||||||
- ci-test
|
- ci-test
|
||||||
workflow_call:
|
workflow_call:
|
||||||
|
|
||||||
|
env:
|
||||||
|
ETH_TESTING_REF: v0.5.2
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
integration-tests:
|
integration-tests:
|
||||||
name: Run integration tests
|
name: Run integration tests
|
||||||
@ -29,16 +32,15 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
repository: cerc-io/eth-testing
|
repository: cerc-io/eth-testing
|
||||||
path: ./fixtures
|
path: ./fixtures
|
||||||
ref: v0.4.0
|
ref: ${{ env.ETH_TESTING_REF }}
|
||||||
# Run a sanity test against the fixture data
|
# Run a sanity test against the fixture data
|
||||||
# Complete integration tests are TODO
|
# Complete integration tests are TODO
|
||||||
- name: Run basic integration test
|
- name: Run basic integration test
|
||||||
env:
|
env:
|
||||||
DATABASE_TYPE: postgres
|
ETHDB_PATH: ./fixtures/chains/data/premerge2/geth/chaindata
|
||||||
ETHDB_PATH: ./fixtures/chaindata/_data/small2
|
ETH_CHAIN_CONFIG: ./fixtures/chains/data/premerge2/genesis.config.json
|
||||||
ETHDB_ANCIENT: ./fixtures/chaindata/_data/small2/ancient
|
ETH_GENESIS_BLOCK: 0x8a3c7cddacbd1ab4ec1b03805fa2a287f3a75e43d87f4f987fcc399f5c042614
|
||||||
LOG_FILE: ./server-log
|
LOG_FILE: ./server-log
|
||||||
ETH_GENESIS_BLOCK: "0x8a3c7cddacbd1ab4ec1b03805fa2a287f3a75e43d87f4f987fcc399f5c042614"
|
|
||||||
timeout-minutes: 20
|
timeout-minutes: 20
|
||||||
run: |
|
run: |
|
||||||
./eth-statediff-service --config ./test/ci-config.toml serve &
|
./eth-statediff-service --config ./test/ci-config.toml serve &
|
||||||
@ -72,12 +74,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
go-version-file: ./eth-statediff-service/go.mod
|
go-version-file: ./eth-statediff-service/go.mod
|
||||||
check-latest: true
|
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
|
- name: Build current version
|
||||||
working-directory: ./eth-statediff-service
|
working-directory: ./eth-statediff-service
|
||||||
run: go build -o ../service-current .
|
run: go build -o ../service-current .
|
||||||
@ -91,22 +87,28 @@ jobs:
|
|||||||
working-directory: ./eth-statediff-service-canonical
|
working-directory: ./eth-statediff-service-canonical
|
||||||
run: go build -o ../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
|
- name: Run DB container
|
||||||
working-directory: ./eth-statediff-service
|
working-directory: ./eth-statediff-service
|
||||||
run: docker compose -f test/compose.yml up --wait
|
run: docker compose -f test/compose.yml up --wait
|
||||||
- name: Compare statediff output
|
- name: Compare statediff output
|
||||||
timeout-minutes: 10
|
timeout-minutes: 10
|
||||||
env:
|
env:
|
||||||
ETHDB_PATH: ./fixtures/chaindata/_data/small2
|
ETHDB_PATH: ./fixtures/chains/data/premerge2/geth/chaindata
|
||||||
ETHDB_ANCIENT: ./fixtures/chaindata/_data/small2/ancient
|
ETHDB_ANCIENT: ./fixtures/chains/data/premerge2/geth/chaindata/ancient
|
||||||
|
ETH_CHAIN_CONFIG: ./fixtures/chains/data/premerge2/genesis.config.json
|
||||||
ETH_GENESIS_BLOCK: "0x8a3c7cddacbd1ab4ec1b03805fa2a287f3a75e43d87f4f987fcc399f5c042614"
|
ETH_GENESIS_BLOCK: "0x8a3c7cddacbd1ab4ec1b03805fa2a287f3a75e43d87f4f987fcc399f5c042614"
|
||||||
ETH_CHAIN_CONFIG: ./eth-statediff-service/test/ci-chain.json
|
|
||||||
run: |
|
run: |
|
||||||
until
|
until
|
||||||
ready_query='select max(version_id) from goose_db_version;'
|
ready_query='select max(version_id) from goose_db_version;'
|
||||||
version=$(docker exec -e PGPASSWORD=password test-ipld-eth-db-1 \
|
version=$(docker exec -e PGPASSWORD=password test-ipld-eth-db-1 \
|
||||||
psql -tA cerc_testing -U vdbm -c "$ready_query")
|
psql -tA cerc_testing -U vdbm -c "$ready_query")
|
||||||
[[ "$version" -ge 18 ]]
|
[[ "$version" -ge 21 ]]
|
||||||
do sleep 1; done
|
do sleep 1; done
|
||||||
|
|
||||||
./eth-statediff-service/scripts/compare-statediffs.sh \
|
./eth-statediff-service/scripts/compare-statediffs.sh \
|
||||||
|
@ -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
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,8 +1,4 @@
|
|||||||
# Config file for service in compose.yml
|
# Config file for github workflow
|
||||||
|
|
||||||
# [ethdb]
|
|
||||||
# mode = "local"
|
|
||||||
# url = "http://127.0.0.1:8082/"
|
|
||||||
|
|
||||||
[server]
|
[server]
|
||||||
ipcPath = ".ipc"
|
ipcPath = ".ipc"
|
||||||
@ -30,7 +26,6 @@
|
|||||||
trie = 1024
|
trie = 1024
|
||||||
|
|
||||||
[ethereum]
|
[ethereum]
|
||||||
chainConfig = "test/ci-chain.json"
|
|
||||||
nodeID = "test-node"
|
nodeID = "test-node"
|
||||||
clientName = "test-eth-statediff-service"
|
clientName = "test-eth-statediff-service"
|
||||||
networkID = "test-network"
|
networkID = "test-network"
|
||||||
|
@ -3,7 +3,7 @@ services:
|
|||||||
restart: on-failure
|
restart: on-failure
|
||||||
depends_on:
|
depends_on:
|
||||||
- ipld-eth-db
|
- 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:
|
environment:
|
||||||
DATABASE_USER: "vdbm"
|
DATABASE_USER: "vdbm"
|
||||||
DATABASE_NAME: "cerc_testing"
|
DATABASE_NAME: "cerc_testing"
|
||||||
|
Loading…
Reference in New Issue
Block a user