-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
44 lines (31 loc) · 937 Bytes
/
Makefile
File metadata and controls
44 lines (31 loc) · 937 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
# Makefile for agentbox
# See CONTRIBUTING.md for development workflow.
.PHONY: build test test-race test-examples lint vet cover bench clean check fmt fmt-check
# Default target runs the full CI check suite.
check: fmt-check vet lint test-race test-examples
build:
go build ./...
test:
CGO_ENABLED=0 go test -count=1 ./...
test-race:
CGO_ENABLED=0 go test -race -count=1 ./...
test-examples:
CGO_ENABLED=0 go test -count=1 ./examples/...
lint:
golangci-lint run
vet:
go vet ./...
cover:
CGO_ENABLED=0 go test -race -coverprofile=coverage.out ./...
go tool cover -html=coverage.out -o coverage.html
@echo "Coverage report: coverage.html"
bench:
CGO_ENABLED=0 go test -bench=. -benchmem -run=^$$ ./...
fmt:
gofmt -w .
fmt-check:
@test -z "$$(gofmt -l .)" || { echo "Files not formatted:"; gofmt -l .; exit 1; }
clean:
rm -f coverage.out coverage.html
rm -f proxy/coverage.out proxy/coverage.html
rm -rf .build