-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
34 lines (24 loc) · 869 Bytes
/
Makefile
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
TEST_PKG?=./...
lint-prepare:
@curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s latest
lint:
test -f ./bin/golangci-lint || make lint-prepare
./bin/golangci-lint run -v --timeout=5m ./...
lint-docker:
@docker run --rm -v $(shell pwd):/app -w /app golangci/golangci-lint:latest golangci-lint run -v --timeout=5m ./...
fmt:
@go fmt ./...
test:
@go test -v -race -timeout=10m `go list ./... | grep -v -E "benchmark|examples"`
test-pkg:
@go test -v -race -timeout=10m ${TEST_PKG}
test-cov:
@go test -v -race -timeout=10m -coverprofile cover.out `go list ./... | grep -v -E "benchmark|examples"`
test-open-cov:
@make test-cov
@go tool cover -html cover.out -o cover.html
open cover.html
bench:
@go test -benchmem -bench ^Bench_* ./benchmark
bench-load:
@go test -benchmem -bench ^Bench_* ./benchmark/load/...