-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
30 lines (24 loc) · 707 Bytes
/
Makefile
File metadata and controls
30 lines (24 loc) · 707 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
BINARY_NAME := mdp
GO := go
GOFLAGS :=
MAIN_PATH := ./cmd/mdp/main.go
.PHONY: all build test e2e-test lint
all: build
build:
@echo "Building $(BINARY_NAME)..."
$(GO) build $(GOFLAGS) -o $(BINARY_NAME) $(MAIN_PATH)
@echo "Build complete: $(BINARY_NAME)"
# Run tests in Docker to avoid interference from user's local config files
# To run without Docker: go test ./...
test:
@echo "Running tests in Docker..."
docker run --rm -v $(CURDIR):/app -v mdp-go-cache:/go -w /app golang:1.25-alpine go test ./...
@echo "Tests completed."
e2e-test: build
@echo "Running e2e tests..."
./e2e/run.sh
@echo "E2E tests completed."
lint:
@echo "Running linter..."
golangci-lint run
@echo "Lint completed."