-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathMakefile
More file actions
22 lines (17 loc) · 840 Bytes
/
Makefile
File metadata and controls
22 lines (17 loc) · 840 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
.PHONY: test help fmt report-coveralls benchmark lint
help: ## Show the help text
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-20s\033[93m %s\n", $$1, $$2}'
test: ## Run unit tests
@echo "Testing with timex_disable tag (only root package)"
@go test -tags=timex_disable -race .
@echo "Testing without timex_disable tag (normal)"
@go test -coverprofile=coverage.out -covermode=atomic -race ./...
lint:
@golangci-lint run
fmt: ## Format files
@goimports -w $$(find . -name "*.go" -not -path "./vendor/*")
benchmark: ## Run benchmarks
@echo "Benchmarks with timex_disable tag"
@go test -run=NONE -benchmem -benchtime=5s -bench=. -tags=timex_disable .
@echo "Benchmarks without timex_disable tag (normal)"
@go test -run=NONE -benchmem -benchtime=5s -bench=. .