Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 1 | language: go |
| 2 | |
| 3 | os: |
| 4 | - linux |
| 5 | - osx |
| 6 | |
| 7 | go: |
| 8 | - 1.x |
| 9 | - 1.7.x |
| 10 | - 1.8.x |
| 11 | - 1.9.x |
| 12 | - 1.10.x |
| 13 | |
| 14 | install: |
| 15 | # go-flags |
| 16 | - go get -d -v ./... |
| 17 | - go build -v ./... |
| 18 | |
| 19 | # linting |
| 20 | - go get github.com/golang/lint/golint |
| 21 | |
| 22 | # code coverage |
| 23 | - go get golang.org/x/tools/cmd/cover |
| 24 | - go get github.com/onsi/ginkgo/ginkgo |
| 25 | - go get github.com/modocache/gover |
| 26 | - if [ "$TRAVIS_SECURE_ENV_VARS" = "true" ]; then go get github.com/mattn/goveralls; fi |
| 27 | |
| 28 | script: |
| 29 | # go-flags |
| 30 | - $(exit $(gofmt -l . | wc -l)) |
| 31 | - go test -v ./... |
| 32 | |
| 33 | # linting |
| 34 | - go tool vet -all=true -v=true . || true |
| 35 | - $(go env GOPATH | awk 'BEGIN{FS=":"} {print $1}')/bin/golint ./... |
| 36 | |
| 37 | # code coverage |
| 38 | - $(go env GOPATH | awk 'BEGIN{FS=":"} {print $1}')/bin/ginkgo -r -cover |
| 39 | - $(go env GOPATH | awk 'BEGIN{FS=":"} {print $1}')/bin/gover |
| 40 | - if [ "$TRAVIS_SECURE_ENV_VARS" = "true" ]; then $(go env GOPATH | awk 'BEGIN{FS=":"} {print $1}')/bin/goveralls -coverprofile=gover.coverprofile -service=travis-ci -repotoken $COVERALLS_TOKEN; fi |
| 41 | |
| 42 | env: |
| 43 | # coveralls.io |
| 44 | secure: "RCYbiB4P0RjQRIoUx/vG/AjP3mmYCbzOmr86DCww1Z88yNcy3hYr3Cq8rpPtYU5v0g7wTpu4adaKIcqRE9xknYGbqj3YWZiCoBP1/n4Z+9sHW3Dsd9D/GRGeHUus0laJUGARjWoCTvoEtOgTdGQDoX7mH+pUUY0FBltNYUdOiiU=" |