Skip to content

Commit

Permalink
make: collect coverprofile separately from goveralls (go-critic#769)
Browse files Browse the repository at this point in the history
Also export GO111MODULE=on globally.
This might be a temporary solution.

Fixes go-critic#767 

Signed-off-by: Iskander Sharipov <[email protected]>
  • Loading branch information
quasilyte authored Jan 15, 2019
1 parent 04d160f commit 09582e2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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
Expand All @@ -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
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=

0 comments on commit 09582e2

Please sign in to comment.