Skip to content

Commit 04ae50f

Browse files
committed
travis: update script for coverage
1 parent ffebbbf commit 04ae50f

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

Makefile

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,7 @@ test:
44
@go test `go list ./... | grep -v /vendor/`
55

66
test-travis:
7-
@go test -coverprofile=hook.coverprofile ./hook
8-
@go test -coverprofile=tsuru.coverprofile ./tsuru
9-
@gover
10-
@goveralls -coverprofile=gover.coverprofile -service travis-ci
7+
./travis-test.sh
118

129
build:
1310
GOARCH="amd64" GOOS="linux" go build -o ./build/snitch_linux/snitch

travis-test.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/usr/bin/env bash
2+
set -e
3+
4+
for d in $(go list ./... | grep -v vendor); do
5+
go test -coverprofile=profile.out $d
6+
if [ -f profile.out ]; then
7+
cat profile.out > `echo $d | awk -F "/" '{print $NF}'`.coverprofile
8+
rm profile.out
9+
fi
10+
done
11+
gover && goveralls -coverprofile=gover.coverprofile -service travis-ci

0 commit comments

Comments
 (0)