Files
galaxy-game/gamemaster/Makefile
T
2026-05-03 07:59:03 +02:00

33 lines
1.2 KiB
Makefile

# Makefile for galaxy/gamemaster.
#
# The `jet` target regenerates the go-jet/v2 query-builder code under
# internal/adapters/postgres/jet/ against a transient PostgreSQL container
# brought up by cmd/jetgen. Generated code is committed; running this
# target requires a reachable Docker daemon (testcontainers spins up a
# postgres:16-alpine container).
#
# The `mocks` target regenerates the gomock-driven mocks via the
# //go:generate directives that live next to the interfaces they cover:
# - internal/ports/ — port interfaces (PLAN stage 10)
# - internal/api/internalhttp/handlers/ — REST handler service ports (PLAN stage 19)
# Generated code is committed.
#
# The `integration` target runs the service-local end-to-end suite under
# integration/ (PLAN stage 21). It requires a reachable Docker daemon
# (`/var/run/docker.sock` or `DOCKER_HOST`); without one the helpers in
# integration/harness call t.Skip and the tests are no-ops.
.PHONY: jet mocks integration
jet:
go run ./cmd/jetgen
mocks:
go generate ./internal/ports/...
@if [ -d ./internal/api/internalhttp/handlers ]; then \
go generate ./internal/api/internalhttp/handlers/...; \
fi
integration:
go test -tags=integration -count=1 ./integration/...