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
|
.PHONY: all test test-local test-ci install-deps lint fmt vet
all: test
test-local: install-deps fmt lint vet
@echo "+ $@"
@go test -v ./...
test:
@docker-compose run --rm test
# Because CircleCI fails to rm a container
test-ci:
@docker-compose run test
install-deps:
@echo "+ $@"
@go get -u github.com/golang/lint/golint
@go get -d ./...
lint:
@echo "+ $@"
@test -z "$$(golint ./... | tee /dev/stderr)"
fmt:
@echo "+ $@"
@test -z "$$(gofmt -s -l . | tee /dev/stderr)"
vet:
@echo "+ $@"
@go vet ./...
|