-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
53 lines (40 loc) · 851 Bytes
/
Makefile
File metadata and controls
53 lines (40 loc) · 851 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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
.PHONY: build run test clean docker-build docker-up docker-down
# Build the application
build:
go build -o bin/gateway ./cmd/gateway
# Run the application
run:
go run ./cmd/gateway
# Run with hot reload (requires air: go install github.com/cosmtrek/air@latest)
dev:
air
# Run tests
test:
go test -v ./...
# Run tests with coverage
test-coverage:
go test -v -coverprofile=coverage.out ./...
go tool cover -html=coverage.out -o coverage.html
# Clean build artifacts
clean:
rm -rf bin/
rm -f coverage.out coverage.html
# Format code
fmt:
go fmt ./...
# Run linter (requires golangci-lint)
lint:
golangci-lint run
# Download dependencies
deps:
go mod download
go mod tidy
# Docker commands
docker-build:
docker-compose build
docker-up:
docker-compose up -d
docker-down:
docker-compose down
docker-logs:
docker-compose logs -f