This fix adds the codecov.io process with travis-ci integration, so that code coverage could be processed and displayed with codecov.io. Since go cannot use test profile flag with multiple packages, we have to iterate through packages with `coverage.sh`. Some consolidation could be done by combining them into one `make test`. Will do some consolidation in a follow up PR. Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
12 lines
274 B
Bash
Executable file
12 lines
274 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
set -e -x
|
|
echo "" > coverage.txt
|
|
|
|
for d in $(go list ./... | grep -v vendor); do
|
|
go test -race -coverprofile=profile.out -covermode=atomic $d
|
|
if [ -f profile.out ]; then
|
|
cat profile.out >> coverage.txt
|
|
rm profile.out
|
|
fi
|
|
done
|