Setup travis

This commit is contained in:
Daniel 2019-08-20 16:20:41 +02:00
parent 15ac1985bb
commit 910db8d133
2 changed files with 13 additions and 0 deletions

8
.travis.yml Normal file
View file

@ -0,0 +1,8 @@
language: go
os:
- linux
- windows
script:
- test

5
test
View file

@ -46,9 +46,14 @@ function run {
baseDir="$( cd "$(dirname "$0")" && pwd )"
cd "$baseDir"
# platform info
platformInfo=$(go env GOOS GOARCH)
echo "running tests for ${platformInfo//$'\n'/ }"
# get all packages
packages=$(go list ./...)
# run vet/test on packages
for package in $packages; do
run go vet $package
run go test -cover $package