2021-06-01 08:49:39 +03:00
|
|
|
GODEPS = $(shell git ls-files '*.go' go.mod go.sum)
|
|
|
|
|
|
|
|
undocker: $(GODEPS)
|
|
|
|
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build
|
|
|
|
|
2021-06-01 08:42:23 +03:00
|
|
|
.PHONY: test
|
|
|
|
test:
|
2021-06-01 09:00:27 +03:00
|
|
|
go test -race -cover ./...
|
|
|
|
|
|
|
|
.PHONY: lint
|
|
|
|
lint:
|
|
|
|
staticcheck -f stylish ./...
|
|
|
|
go vet ./...
|
2021-06-01 08:42:23 +03:00
|
|
|
|
|
|
|
.INTERMEDIATE: coverage.out
|
2021-06-01 08:49:39 +03:00
|
|
|
coverage.out: $(GODEPS)
|
2021-06-01 08:42:23 +03:00
|
|
|
go test -coverprofile $@ ./...
|
|
|
|
|
|
|
|
coverage.html: coverage.out
|
|
|
|
go tool cover -html=$< -o $@
|