From 8af8ddcf48c5fe33967a09d1cd5d13d9da6506b1 Mon Sep 17 00:00:00 2001 From: Efremenko Arhip Date: Thu, 23 Jul 2026 21:12:32 +0300 Subject: [PATCH] =?UTF-8?q?build:=20add=20`make=20check`=20=E2=80=94=20run?= =?UTF-8?q?=20the=20whole=20suite=20with=20one=20command?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit vet + lint + race unit tests, then bring up the stack and run the integration suite and the end-to-end smoke test. One command for a reviewer to verify everything. --- coordinator/Makefile | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) 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