Testing Codecov (#375)

This commit is contained in:
Preston Van Loon 2018-08-06 23:58:21 -04:00 committed by Raul Jordan
parent 7a1f5869c2
commit 36965bee5e
3 changed files with 22 additions and 0 deletions

4
.gitignore vendored
View File

@ -6,3 +6,7 @@ bazel-*
# delve debugger output (not sure how to get rid of these)
**/debug.test
# Coverage outputs
coverage.txt
profile.out

View File

@ -10,6 +10,12 @@ matrix:
script:
-
go get github.com/alecthomas/gometalinter && gometalinter --install && gometalinter ./... --deadline=10m --exclude=client/internal/client_helper.go
- os: linux
env:
- coverage
script:
- ./coverage.sh
- bash <(curl -s https://codecov.io/bash)
- os: linux
env: V=0.15.0
before_install:

12
coverage.sh Executable file
View File

@ -0,0 +1,12 @@
#!/usr/bin/env bash
set -e
echo "" > coverage.txt
for d in $(go list ./... | grep -v vendor); do
go test -coverprofile=profile.out -covermode=atomic $d
if [ -f profile.out ]; then
cat profile.out >> coverage.txt
rm profile.out
fi
done