2023-05-19 03:46:51 +00:00
|
|
|
name: Run tests
|
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
2023-09-08 21:54:49 +00:00
|
|
|
- uses: actions/setup-go@v4
|
2023-05-19 03:46:51 +00:00
|
|
|
with:
|
|
|
|
go-version-file: 'go.mod'
|
|
|
|
check-latest: true
|
|
|
|
- name: "Run DB container"
|
|
|
|
working-directory: ./test
|
2023-09-08 21:54:49 +00:00
|
|
|
run: docker compose up --wait --quiet-pull
|
2023-05-19 03:46:51 +00:00
|
|
|
- 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 ./...
|