2017-12-29 08:00:47 -05:00
|
|
|
TEST?=$$(go list ./... |grep -Ev 'vendor|examples|testutils')
|
|
|
|
GOFMT_FILES?=$$(find . -name '*.go' |grep -v vendor)
|
|
|
|
|
2020-05-11 15:26:01 -04:00
|
|
|
default: check test
|
2017-12-29 08:00:47 -05:00
|
|
|
|
|
|
|
tools:: ## Download and install all dev/code tools
|
|
|
|
@echo "==> Installing dev tools"
|
|
|
|
go get -u github.com/golang/dep/cmd/dep
|
2020-05-11 15:26:01 -04:00
|
|
|
go get -u github.com/alecthomas/gometalinter
|
|
|
|
gometalinter --install
|
|
|
|
|
|
|
|
build::
|
|
|
|
@govvv build
|
|
|
|
|
|
|
|
install::
|
|
|
|
@govvv install
|
2017-12-29 08:00:47 -05:00
|
|
|
|
|
|
|
test:: ## Run unit tests
|
2018-01-16 12:48:25 -05:00
|
|
|
@echo "==> Running unit test with coverage"
|
|
|
|
@./scripts/go-test-with-coverage.sh
|
2017-12-29 08:00:47 -05:00
|
|
|
|
|
|
|
testacc:: ## Run acceptance tests
|
|
|
|
@echo "==> Running acceptance tests"
|
|
|
|
TRITON_TEST=1 go test $(TEST) -v $(TESTARGS) -run -timeout 120m
|
|
|
|
|
2020-05-11 15:26:01 -04:00
|
|
|
check::
|
|
|
|
gometalinter \
|
|
|
|
--deadline 10m \
|
|
|
|
--vendor \
|
|
|
|
--sort="path" \
|
|
|
|
--aggregate \
|
|
|
|
--enable-gc \
|
|
|
|
--disable-all \
|
|
|
|
--enable goimports \
|
|
|
|
--enable misspell \
|
|
|
|
--enable vet \
|
|
|
|
--enable deadcode \
|
|
|
|
--enable varcheck \
|
|
|
|
--enable ineffassign \
|
|
|
|
--enable gofmt \
|
|
|
|
./...
|
2017-12-29 08:00:47 -05:00
|
|
|
|
|
|
|
.PHONY: help
|
|
|
|
help:: ## Display this help message
|
|
|
|
@echo "GNU make(1) targets:"
|
|
|
|
@grep -E '^[a-zA-Z_.-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-15s\033[0m %s\n", $$1, $$2}'
|