diff --git a/Makefile b/Makefile index efd51df61..513857073 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,7 @@ .PHONY: test test-checker ci cover tools docs +export GO111MODULE := on + %: # stubs to get makefile param for `test-checker` command @: # see: https://stackoverflow.com/a/6273809/433041 @@ -16,11 +18,10 @@ docs: cd ./cmd/makedocs && go run main.go ci: - GO111MODULE=on go mod vendor @if [ "$(TEST_SUITE)" = "linter" ]; then make ci-linter; else make ci-tests; fi ci-tests: - go test -v -race -count=1 ./... + go test -v -race -count=1 -coverprofile=coverage.out ./... ci-linter: curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | bash -s -- -b ${GOPATH}/bin v1.12.3 @@ -30,7 +31,7 @@ ci-linter: cover: go get -u github.com/mattn/goveralls - goveralls -package github.com/go-critic/go-critic/checkers -service travis-ci -repotoken ${COVERALLS_TOKEN} + goveralls -package github.com/go-critic/go-critic/checkers -coverprofile=coverage.out -service travis-ci -repotoken ${COVERALLS_TOKEN} install: go install ./cmd/gocritic diff --git a/go.mod b/go.mod index c4cc8d49f..39e47fd81 100644 --- a/go.mod +++ b/go.mod @@ -9,5 +9,6 @@ require ( github.com/go-toolsmith/astp v0.0.0-20180903215135-0af7e3c24f30 github.com/go-toolsmith/strparse v0.0.0-20180903215201-830b6daa1241 github.com/go-toolsmith/typep v0.0.0-20181030061450-d63dc7650676 + github.com/mattn/goveralls v0.0.2 // indirect golang.org/x/tools v0.0.0-20181205014116-22934f0fdb62 ) diff --git a/go.sum b/go.sum index d8a19b9a5..dbe7eda58 100644 --- a/go.sum +++ b/go.sum @@ -20,6 +20,8 @@ github.com/google/go-cmp v0.2.0 h1:+dTQ8DZQJz0Mb/HjFlkptS1FeQ4cWSnN941F8aEG4SQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/logrusorgru/aurora v0.0.0-20181002194514-a7b3b318ed4e h1:9MlwzLdW7QSDrhDjFlsEYmxpFyIoXmYRon3dt0io31k= github.com/logrusorgru/aurora v0.0.0-20181002194514-a7b3b318ed4e/go.mod h1:7rIyQOR62GCctdiQpZ/zOJlFyk6y+94wXzv6RNZgaR4= +github.com/mattn/goveralls v0.0.2 h1:7eJB6EqsPhRVxvwEXGnqdO2sJI0PTsrWoTMXEk9/OQc= +github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw= golang.org/x/tools v0.0.0-20181117154741-2ddaf7f79a09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181205014116-22934f0fdb62 h1:KRNg63y5nZTd4po+9IAmrqBNARjHSwNMrkRrJj0AViU= golang.org/x/tools v0.0.0-20181205014116-22934f0fdb62/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=