-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
56 lines (44 loc) · 1.12 KB
/
Copy pathMakefile
File metadata and controls
56 lines (44 loc) · 1.12 KB
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
54
55
56
.PHONY: test test-verbose test-coverage test-race bench clean fmt lint oapi
# Default target
all: test
# Run tests
test:
go test
# Run tests with verbose output
test-verbose:
go test -v
# Run tests with coverage
test-coverage:
go test -cover
# Run tests with race detection
test-race:
go test -race
# Run benchmarks
bench:
go test -bench=.
test-all: test-verbose test-coverage test-race bench
# Format code
fmt:
go fmt ./...
# Lint code (requires golangci-lint to be installed)
lint:
golangci-lint run --fix
# Clean test cache
clean:
go clean -testcache
# Generate OpenAPI server code from spec
oapi:
go generate tools.go
# Show help
help:
@echo "Available targets:"
@echo " test - Run basic tests"
@echo " test-verbose - Run tests with verbose output"
@echo " test-coverage - Run tests with coverage"
@echo " test-race - Run tests with race detection"
@echo " bench - Run benchmarks"
@echo " test-all - Run all tests"
@echo " fmt - Format code"
@echo " lint - Lint code"
@echo " clean - Clean test cache"
@echo " help - Show this help"