diff --git a/coordinator/Makefile b/coordinator/Makefile index 7dceb9b..bdc1313 100644 --- a/coordinator/Makefile +++ b/coordinator/Makefile @@ -1,4 +1,4 @@ -.PHONY: build run test vet tidy migrate-up migrate-down up down logs ps rebuild psql +.PHONY: build run test test-integration vet lint tidy check migrate-up migrate-down up down down-clean logs ps rebuild psql smoke # --- build / run --------------------------------------------------------- build: @@ -18,6 +18,19 @@ test-integration: vet: go vet ./... +# One command that runs everything: unit tests + vet + lint, then brings up the +# stack and runs the integration suite and the end-to-end smoke test. +# Needs Docker. Hand this to a reviewer. +check: vet lint + go test -race ./... + docker compose up -d --build + @echo "waiting for the coordinator to be ready..." + @sleep 6 + TEST_DATABASE_URL='postgres://scimesh:scimesh@localhost:5432/scimesh?sslmode=disable' \ + go test -tags=integration ./internal/storage/postgres/ -v + ./scripts/smoke.sh + @echo "\nall checks passed ✓" + # Runs golangci-lint without installing it system-wide. Install it for speed: # pacman -S golangci-lint (Arch) LINT_VERSION := v2.12.2