update tests

This commit is contained in:
Roy Crihfield 2024-04-24 17:45:53 +08:00
parent 00c2cd66bc
commit e954370cd6
2 changed files with 4 additions and 24 deletions

View File

@ -8,8 +8,6 @@ on:
- main - main
env: env:
# Needed until we can incorporate docker startup into the executor container
DOCKER_HOST: unix:///var/run/dind.sock
CANONICAL_VERSION: v5.0.4-alpha CANONICAL_VERSION: v5.0.4-alpha
jobs: jobs:
@ -27,21 +25,12 @@ jobs:
with: with:
repository: cerc-io/eth-testing repository: cerc-io/eth-testing
path: ./fixtures path: ./fixtures
ref: v0.3.1 ref: v0.4.0
- name: Configure Gitea access
env:
TOKEN: ${{ secrets.CICD_REPO_TOKEN }}
run: |
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
run: make test run: make test
- name: Run dockerd
run: |
dockerd -H $DOCKER_HOST --userland-proxy=false &
sleep 5
- name: Run DB container - name: Run DB container
run: docker compose -f test/compose.yml up --wait run: docker compose -f test/compose.yml up --wait
@ -59,7 +48,7 @@ jobs:
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 20 ]]
do sleep 1; done do sleep 1; done
./ipld-eth-state-snapshot --config test/ci-config.toml stateSnapshot ./ipld-eth-state-snapshot --config test/ci-config.toml stateSnapshot
@ -90,12 +79,7 @@ jobs:
with: with:
repository: cerc-io/eth-testing repository: cerc-io/eth-testing
path: ./fixtures path: ./fixtures
ref: v0.3.1 ref: v0.4.0
- name: Configure Gitea access
env:
TOKEN: ${{ secrets.CICD_REPO_TOKEN }}
run: |
git config --global url."https://$TOKEN:@git.vdb.to/".insteadOf https://git.vdb.to/
- name: Build current version - name: Build current version
working-directory: ./ipld-eth-state-snapshot working-directory: ./ipld-eth-state-snapshot
run: go build -o ../snapshot-current . run: go build -o ../snapshot-current .
@ -109,10 +93,6 @@ jobs:
working-directory: ./ipld-eth-state-snapshot-canonical working-directory: ./ipld-eth-state-snapshot-canonical
run: go build -o ../snapshot-canonical . run: go build -o ../snapshot-canonical .
- name: Run dockerd
run: |
dockerd -H $DOCKER_HOST --userland-proxy=false &
sleep 5
- name: Run DB container - name: Run DB container
working-directory: ./ipld-eth-state-snapshot working-directory: ./ipld-eth-state-snapshot
run: docker compose -f test/compose.yml up --wait run: docker compose -f test/compose.yml up --wait

View File

@ -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.2.1-alpha
environment: environment:
DATABASE_USER: "vdbm" DATABASE_USER: "vdbm"
DATABASE_NAME: "cerc_testing" DATABASE_NAME: "cerc_testing"