diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9e99967c4..45642a6fa 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -52,16 +52,20 @@ jobs: - build - test-unit runs-on: ubuntu-latest + env: + DISCONNECTED: 1 + HUB_BASE_URL: http://localhost:8080 + DB_PATH: /tmp/hub.db steps: - uses: actions/checkout@v4 - uses: actions/setup-go@v3 with: go-version: '1.19' - run: | - DISCONNECTED=1 make run & + rm -f $DB_PATH + make run & sleep 15 # probably a dirty solution - DISCONNECTED=1 HUB_BASE_URL=http://localhost:8080 make test-api - DISCONNECTED=1 HUB_BASE_URL=http://localhost:8080 make test-api # Intentionaly run 2x to catch data left in Hub DB. + make test-api build-image: needs: diff --git a/Makefile b/Makefile index cc27ae466..e8463bc85 100644 --- a/Makefile +++ b/Makefile @@ -143,7 +143,7 @@ test: # Run Hub REST API tests. test-api: - HUB_BASE_URL=$(HUB_BASE_URL) go test -count=1 -p=1 -v ./test/api/... + HUB_BASE_URL=$(HUB_BASE_URL) go test -count=1 -p=1 -v -failfast ./test/api/... # Run Hub test suite. test-all: test-unit test-api