diff --git a/.travis.yml b/.travis.yml index a2d90f4..63fd074 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,14 @@ language: go -install: - - go get ./... +sudo: false go: - - 1.8 - - 1.7 - - 1.6 - - tip + - 1.7.x + - 1.8.x + +before_install: + - go get -t -v ./... + +script: + - ./go.test.sh + +after_success: + - bash <(curl -s https://codecov.io/bash) diff --git a/go.test.sh b/go.test.sh new file mode 100755 index 0000000..34dbbfb --- /dev/null +++ b/go.test.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash + +set -e +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