Fix multi-package coverage generation

We are currently only uploading the coverage for the main package, so
our coverage appears much lower then it really is. This updates our
tooling to properly cover every package

Resolves #240
This commit is contained in:
Sean DuBois
2018-11-24 22:30:21 -08:00
parent a0892b2392
commit 596f8dde7f
2 changed files with 6 additions and 3 deletions

3
.gitignore vendored
View File

@@ -10,4 +10,5 @@ vendor/
### Files ###
#############
*.ivf
tags
tags
.coverprofile

View File

@@ -13,14 +13,16 @@ before_install:
before_script:
- curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | bash -s -- -b $GOPATH/bin v1.10.2
- go get github.com/mattn/goveralls
- go get github.com/mattn/goveralls github.com/modocache/gover
script:
- bash .github/build-examples.sh
- rm -rf examples
# Remove examples, no test coverage for them
- golangci-lint run
- goveralls -v -race -covermode=atomic -service=travis-ci
- go list -f '{{if len .TestGoFiles}}"go test -coverprofile={{.Dir}}/.coverprofile {{.ImportPath}}"{{end}}' ./... | xargs sh -c
- gover
- goveralls -v -race -coverprofile=gover.coverprofile -service=travis-ci
- bash .github/assert-contributors.sh
- bash .github/lint-disallowed-functions-in-library.sh
- bash .github/lint-commit-message.sh