-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
36 lines (28 loc) · 734 Bytes
/
Makefile
File metadata and controls
36 lines (28 loc) · 734 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
.PHONY: test lint cover build ci clean help
## test: Run tests
test:
go test -race ./...
## lint: Run golangci-lint
lint:
golangci-lint run
## cover: Run tests with coverage
cover:
go test -race -coverprofile=coverage.out -covermode=atomic ./...
go tool cover -func=coverage.out
## cover-html: Generate HTML coverage report
cover-html: cover
go tool cover -html=coverage.out -o coverage.html
## build: Build the package
build:
go build ./...
## ci: Run all CI checks
ci: lint test build
## clean: Remove generated files
clean:
rm -f coverage.out coverage.html
## help: Show this help
help:
@echo "Usage: make [target]"
@echo ""
@echo "Targets:"
@sed -n 's/^##//p' $(MAKEFILE_LIST) | column -t -s ':' | sed 's/^/ /'