Makefile 556 B

123456789101112131415161718192021222324252627
  1. .PHONY: build generate test test-unit test-integration test-e2e
  2. VERSION ?= $(shell ./scripts/resolve-version.sh)
  3. LDFLAGS ?= -s -w -X main.Version=$(VERSION)
  4. build:
  5. CGO_ENABLED=0 go build -ldflags="$(LDFLAGS)" -trimpath -o bin/server ./cmd/server
  6. generate:
  7. go generate ./ent
  8. go generate ./cmd/server
  9. test:
  10. go test ./...
  11. golangci-lint run ./...
  12. test-unit:
  13. go test -tags=unit ./...
  14. test-integration:
  15. go test -tags=integration ./...
  16. test-e2e:
  17. ./scripts/e2e-test.sh
  18. test-e2e-local:
  19. go test -tags=e2e -v -timeout=300s ./internal/integration/...