diff --git a/.travis.sh b/.travis.sh new file mode 100755 index 0000000..1770fa8 --- /dev/null +++ b/.travis.sh @@ -0,0 +1,12 @@ +#!/bin/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 diff --git a/.travis.yml b/.travis.yml index 984033e..f9b46d1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,3 +4,12 @@ go: - 1.7.x - 1.8.x - tip + +before_install: + - go get -t -v ./... + +script: + - ./.travis.sh + +after_success: + - bash <(curl -s https://codecov.io/bash)