diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 204bf56..8c754cc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,8 +25,8 @@ jobs: go-version-file: go.mod - name: gofmt run: make fmt-check - - name: vet - run: go vet ./... + - name: vet (including the e2e and live test files, which are not run here) + run: make vet - name: test run: go test -race -count=1 -coverprofile=coverage.out ./... - name: cross-build linux amd64/arm64 diff --git a/Makefile b/Makefile index d34a748..2cd6bd4 100644 --- a/Makefile +++ b/Makefile @@ -26,8 +26,12 @@ build-linux: fmt-check: @out=$$(gofmt -l cmd internal pkg api); if [ -n "$$out" ]; then echo "gofmt needed:"; echo "$$out"; exit 1; fi +# The second pass compiles and vets the tests that need a real stack or a live +# backend (test/e2e, the adapters' live tests). Nothing runs them here, so +# without it they can stop compiling unnoticed. vet: go vet ./... + go vet -tags "e2e live" ./... test: go test -race -count=1 ./... @@ -36,7 +40,7 @@ test: # their fake-server tests: build, vet and test everything with the tag. experimental: go build -tags $(EXPERIMENTAL_TAG) ./... - go vet -tags $(EXPERIMENTAL_TAG) ./... + go vet -tags "$(EXPERIMENTAL_TAG) e2e live" ./... go test -race -count=1 -tags $(EXPERIMENTAL_TAG) ./... # Runs the store conformance suite against a disposable Postgres container.