From 379c3a11900919cdf7296367762e3e41ff30faf3 Mon Sep 17 00:00:00 2001 From: Jalil Date: Tue, 10 Nov 2026 16:10:03 -0800 Subject: [PATCH] ci: vet the end-to-end and live test files `test/e2e` and the adapters' live tests sit behind the `e2e` and `live` build tags. No CI job runs them, and none compiled them either, so a change could break them without anything failing until someone next ran them by hand. `make vet` now also vets with `-tags "e2e live"`, the experimental pass adds the same tags, and the `go` CI job calls `make vet`. This compiles and vets those tests; it does not run them. Co-Authored-By: Claude Fable 5.2 Signed-off-by: Jalil --- .github/workflows/ci.yml | 4 ++-- Makefile | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) 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.