Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add coveralls.io support #19

Merged
merged 1 commit into from
Apr 6, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ language: go
install:
- go get golang.org/x/tools/cmd/goimports
- go get github.com/golang/lint/golint
- go get github.com/mattn/goveralls
- go get github.com/wadey/gocovmerge
go:
- "1.10"
before_script:
Expand All @@ -11,4 +13,6 @@ before_script:
- ./scripts/imports
- ./scripts/format
script:
- go test -v ./...
- ./scripts/test
after_success:
- $HOME/gopath/bin/goveralls -coverprofile=coverage.out -service=travis-ci
11 changes: 11 additions & 0 deletions scripts/test
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash

# Run tests and create a coverage profile.
i=0
for testingpkg in $(go list ./selvpcclient/.../testing); do
coverpkg=${testingpkg::-8}
go test -v -covermode count -coverprofile "./${i}.coverprofile" -coverpkg $coverpkg $testingpkg
((i++))
done
gocovmerge "$(ls ./*.coverprofile)" > coverage.out
rm *.coverprofile