Skip to content

Commit 1d19042

Browse files
committed
Add code coverage to GoVector
1 parent 813e22a commit 1d19042

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

.travis.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,8 @@ go:
66
- master
77

88
script:
9-
go test -v ./...
9+
- go test -v ./...
10+
- ./test.sh
11+
12+
after_success:
13+
- bash <(curl -s https://codecov.io/bash) -t 6e0ff3d8-4792-4b3e-aedf-c589ad356179

test.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/usr/bin/env bash
2+
3+
set -e
4+
echo "" > coverage.txt
5+
6+
for d in $(go list ./... | grep -v vendor); do
7+
go test -race -coverprofile=profile.out -covermode=atomic $d
8+
if [ -f profile.out ]; then
9+
cat profile.out >> coverage.txt
10+
rm profile.out
11+
fi
12+
done
13+

0 commit comments

Comments
 (0)