diff --git a/Makefile b/Makefile index a83d696f..5da02d94 100644 --- a/Makefile +++ b/Makefile @@ -143,6 +143,7 @@ build: test: $(REQUIRE_ENV) @bash scripts/ensure-postgres.sh "$(ENV_FILE)" + cd server && go run ./cmd/migrate up cd server && go test ./... # Database diff --git a/scripts/check.sh b/scripts/check.sh index 3c11e026..2a024c06 100755 --- a/scripts/check.sh +++ b/scripts/check.sh @@ -100,6 +100,8 @@ pnpm test || { EXIT_CODE=1; exit 1; } # -------------------------------------------------------------------------- echo "" echo "==> [3/5] Go tests..." +echo "==> Running database migrations..." +(cd server && go run ./cmd/migrate up) || { EXIT_CODE=1; exit 1; } (cd server && go test ./...) || { EXIT_CODE=1; exit 1; } # --------------------------------------------------------------------------