CI workflows

This commit is contained in:
2023-05-19 01:08:07 +08:00
parent 5eb6cd2ba8
commit b392e12bdd
4 changed files with 62 additions and 3 deletions
+7
View File
@@ -0,0 +1,7 @@
name: PR actions
on:
- pull_request
jobs:
run-tests:
uses: ./.github/workflows/test.yml
+26
View File
@@ -0,0 +1,26 @@
name: Run tests
on:
workflow_call:
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 ./...