update ci test
All checks were successful
Test / Run unit and integration tests (pull_request) Successful in 4m20s

This commit is contained in:
Roy Crihfield 2023-09-27 22:54:06 +08:00
parent 7f32e9f699
commit 29a470378d
2 changed files with 17 additions and 12 deletions

View File

@ -17,6 +17,13 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: Install test fixtures
uses: actions/checkout@v3
with:
repository: cerc-io/eth-testing
path: ./fixtures
ref: v0.3.1
token: ${{ secrets.CICD_REPO_TOKEN }}
- uses: actions/setup-go@v3 - uses: actions/setup-go@v3
with: with:
go-version-file: go.mod go-version-file: go.mod
@ -25,7 +32,7 @@ jobs:
env: env:
TOKEN: ${{ secrets.CICD_REPO_TOKEN }} TOKEN: ${{ secrets.CICD_REPO_TOKEN }}
run: | run: |
git config --global url."https://$TOKEN:@git.vdb.to/".insteadOf "https://git.vdb.to/" git config --global url."https://$TOKEN:@git.vdb.to/".insteadOf 'https://git.vdb.to/'
- name: Build package - name: Build package
run: go build . run: go build .
- name: Run unit tests - name: Run unit tests
@ -40,12 +47,12 @@ jobs:
# 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 integration tests - name: Run basic integration test
env: env:
SNAPSHOT_MODE: postgres SNAPSHOT_MODE: postgres
SNAPSHOT_BLOCK_HEIGHT: 32 SNAPSHOT_BLOCK_HEIGHT: 10
LEVELDB_PATH: ./fixture/chain2data LEVELDB_PATH: ./fixtures/chaindata/_data/small2
LEVELDB_ANCIENT: ./fixture/chain2data/ancient LEVELDB_ANCIENT: ./fixtures/chaindata/_data/small2/ancient
run: | run: |
until until
ready_query='select max(version_id) from goose_db_version;' ready_query='select max(version_id) from goose_db_version;'
@ -63,5 +70,5 @@ jobs:
} }
set -x set -x
[[ "$(count_results eth.header_cids)" = 1 ]] [[ "$(count_results eth.header_cids)" = 1 ]]
[[ "$(count_results eth.state_cids)" = 5 ]] [[ "$(count_results eth.state_cids)" = 273 ]]
[[ "$(count_results eth.storage_cids)" = 13 ]] [[ "$(count_results eth.storage_cids)" = 31 ]]

View File

@ -9,13 +9,11 @@
level = "debug" level = "debug"
[snapshot] [snapshot]
mode = "postgres"
workers = 4 workers = 4
blockHeight = 0
recoveryFile = "snapshot_recovery_file" recoveryFile = "snapshot_recovery_file"
# Note: these are overriden in the workflow step
[file] # mode = "postgres"
outputDir = "test-output" # blockHeight = 0
[ethereum] [ethereum]
clientName = "test-client" clientName = "test-client"