diff --git a/.travis.yml b/.travis.yml index c9dafdd..15ae630 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,6 +2,9 @@ language: go dist: xenial +go: +- 1.12.x + notifications: email: true @@ -21,8 +24,7 @@ install: - curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b $(go env GOPATH)/bin v1.21.0 script: -- go test `go list ./...` -tags integration -- golangci-lint run +- make travis-ci # To enable semantic-release, uncomment these sections. before_deploy: diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..e846a95 --- /dev/null +++ b/Makefile @@ -0,0 +1,20 @@ +# Makefile to build go-sdk-template + +all: build unittest lint tidy + +travis-ci: build alltest lint tidy + +build: + go build ./... + +unittest: + go test `go list ./... | grep -v samples` + +alltest: + go test `go list ./... | grep -v samples` -v -tags=integration + +lint: + golangci-lint run + +tidy: + go mod tidy