diff options
| author | Eyal Posener <[email protected]> | 2017-05-06 00:38:16 +0300 |
|---|---|---|
| committer | Eyal Posener <[email protected]> | 2017-05-06 00:38:16 +0300 |
| commit | d969de6a6f6e85f45303a530a7ed954b628ab253 (patch) | |
| tree | 36bd20a13df9dcdcac0c2a6e8dec951223b63906 | |
| parent | 84210680452a87de1bcb62ea45241a0ebea991b2 (diff) | |
Add go test script and travis file
| -rw-r--r-- | .gitignore | 2 | ||||
| -rw-r--r-- | .travis.yml | 17 | ||||
| -rwxr-xr-x | go.test.sh | 12 |
3 files changed, 31 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1363720 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +.idea +coverage.txt diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..c942ff1 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,17 @@ +language: go +sudo: false +go: + - 1.7 + - 1.8 + - tip + +before_install: + - go get -u -t ./... + +script: + - ./go.test.sh + +after_success: + - bash <(curl -s https://codecov.io/bash) + +comment: off diff --git a/go.test.sh b/go.test.sh new file mode 100755 index 0000000..41fdfc8 --- /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 -count 20 -v -race -coverprofile=profile.out -covermode=atomic $d + if [ -f profile.out ]; then + cat profile.out >> coverage.txt + rm profile.out + fi +done |
