Debian Codegraph @

Makefile

raw
1 GOPATH=$(shell go env GOPATH)
2 GOLANGCI_LINT=$(GOPATH)/bin/golangci-lint
3
4 .PHONY: lint
5 lint: $(GOLANGCI_LINT)
6 @echo "==> Linting codebase"
7 @$(GOLANGCI_LINT) run
8
9 .PHONY: test
10 test:
11 @echo "==> Running tests"
12 GO111MODULE=on go test -v
13
14 .PHONY: test-cover
15 test-cover:
16 @echo "==> Running Tests with coverage"
17 GO111MODULE=on go test -cover .
18
19 .PHONY: fuzz
20 fuzz:
21 @echo "==> Running Fuzz Tests"
22 go env GOCACHE
23 go test -fuzz=FuzzNewVersion -fuzztime=15s .
24 go test -fuzz=FuzzStrictNewVersion -fuzztime=15s .
25 go test -fuzz=FuzzNewConstraint -fuzztime=15s .
26
27 $(GOLANGCI_LINT):
28 # Install golangci-lint. The configuration for it is in the .golangci.yml
29 # file in the root of the repository
30 echo ${GOPATH}
31 curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(GOPATH)/bin v1.56.2