diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000000000..8ea1ce316 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,18 @@ +language: go + +go: + - master + +# whitelist +branches: + only: + - master + - stable + +script: + - go get -t -v ./... + - go vet ./... + - bash ./gotest.sh + +after_success: + - bash <(curl -s https://codecov.io/bash) diff --git a/gotest.sh b/gotest.sh new file mode 100644 index 000000000..c9cbb90ca --- /dev/null +++ b/gotest.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env bash + +set -e +echo "" > coverage.txt + +for d in $(go list ./Algorithms/... | grep -v vendor); do + echo $d + go test -coverprofile=profile.out -covermode=atomic $d + if [ -f profile.out ]; then + cat profile.out >> coverage.txt + rm profile.out + fi +done