2023-05-05 10:22:13 +00:00
|
|
|
name: Run tests
|
|
|
|
on:
|
2023-09-14 12:29:51 +00:00
|
|
|
- pull_request
|
2023-05-05 10:22:13 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
unit-tests:
|
|
|
|
name: Run unit tests
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: actions/setup-go@v4
|
|
|
|
with:
|
|
|
|
go-version-file: 'go.mod'
|
|
|
|
check-latest: true
|
|
|
|
- name: "Run DB container"
|
|
|
|
working-directory: ./test
|
|
|
|
run: |
|
|
|
|
docker compose up -d --quiet-pull
|
|
|
|
- name: "Build and run tests"
|
|
|
|
run: |
|
|
|
|
until [[ "$(docker inspect test-ipld-eth-db | jq -r '.[0].State.Status')" = 'running' ]]
|
|
|
|
do sleep 1; done &
|
|
|
|
|
|
|
|
go build ./...
|
|
|
|
wait $!
|
|
|
|
go test -v ./...
|