19 lines
579 B
Makefile
19 lines
579 B
Makefile
.PHONY: tools
|
|
tools: # Устанавливает бинарки для тулзов: linter, mockgen, etc.
|
|
cd tools && go mod tidy && go mod verify && go generate -tags tools && chmod +x ../bin/*
|
|
|
|
.PHONY: test
|
|
test:
|
|
go test ./...
|
|
|
|
.PHONY: race
|
|
race:
|
|
go test -race -count 100 -timeout 30s ./...
|
|
|
|
.PHONY: bench
|
|
bench: ## Бенчмарки
|
|
go test -benchtime=3x -benchmem -bench=Benchmark ./... | grep allocs
|
|
|
|
help: ## Print this help and exit
|
|
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
|