2016-02-12 18:02:16 +00:00
|
|
|
.PHONY: \
|
|
|
|
all \
|
|
|
|
lint \
|
|
|
|
pretest \
|
|
|
|
test \
|
2018-11-29 22:08:16 +00:00
|
|
|
integration
|
2016-02-12 18:02:16 +00:00
|
|
|
|
2020-04-29 10:52:35 +00:00
|
|
|
|
|
|
|
ifeq "$(strip $(shell go env GOARCH))" "amd64"
|
|
|
|
RACE_FLAG := -race
|
|
|
|
endif
|
|
|
|
|
2016-02-12 18:02:16 +00:00
|
|
|
all: test
|
|
|
|
|
|
|
|
lint:
|
2020-03-30 19:10:53 +00:00
|
|
|
cd /tmp && GO111MODULE=on go get github.com/golangci/golangci-lint/cmd/golangci-lint@latest
|
|
|
|
golangci-lint run
|
2016-02-12 18:02:16 +00:00
|
|
|
|
2020-03-30 19:10:53 +00:00
|
|
|
pretest: lint
|
2016-02-12 18:02:16 +00:00
|
|
|
|
2016-03-25 00:42:00 +00:00
|
|
|
gotest:
|
2020-04-29 10:52:35 +00:00
|
|
|
go test $(RACE_FLAG) -vet all ./...
|
2016-02-12 18:02:16 +00:00
|
|
|
|
2016-03-25 00:42:00 +00:00
|
|
|
test: pretest gotest
|
|
|
|
|
2016-02-12 18:02:16 +00:00
|
|
|
integration:
|
|
|
|
go test -tags docker_integration -run TestIntegration -v
|