diff --git a/.travis.yml b/.travis.yml index 85fdc13..7e4c325 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,4 +4,4 @@ go: - "1.10" script: - make check - - go test -v -race ./... + - make test diff --git a/Makefile b/Makefile index eb97d0f..23031b4 100644 --- a/Makefile +++ b/Makefile @@ -14,7 +14,7 @@ LDFLAGS=-ldflags "-X=main.version=$(VERSION) -X=main.commit=$(BUILD) -X=main.dat # go source files, ignore vendor directory SRC = $(shell find . -type f -name '*.go' -not -path "./vendor/*") -.PHONY: all build clean install uninstall fmt simplify check run +.PHONY: all build clean install uninstall fmt simplify check run test all: check build @@ -33,6 +33,8 @@ fmt: simplify: @gofmt -s -l -w $(SRC) +test: + @go test -v -race ./... check: @go get -u golang.org/x/lint/golint @test -z $(shell gofmt -l main.go | tee /dev/stderr) || echo "[WARN] Fix formatting issues with 'make fmt'"