Naveen Sampath | 04696f7 | 2022-06-13 15:19:14 +0530 | [diff] [blame] | 1 | language: go |
| 2 | |
| 3 | os: |
| 4 | - linux |
| 5 | - osx |
| 6 | |
| 7 | go: |
| 8 | - 1.16.x |
| 9 | |
| 10 | install: |
| 11 | # go-flags |
| 12 | - go build -v ./... |
| 13 | |
| 14 | # linting |
| 15 | - go get -v golang.org/x/lint/golint |
| 16 | |
| 17 | # code coverage |
| 18 | - go get golang.org/x/tools/cmd/cover |
| 19 | - go get github.com/onsi/ginkgo/ginkgo |
| 20 | - go get github.com/modocache/gover |
| 21 | - if [ "$TRAVIS_SECURE_ENV_VARS" = "true" ]; then go get github.com/mattn/goveralls; fi |
| 22 | |
| 23 | script: |
| 24 | # go-flags |
| 25 | - $(exit $(gofmt -l . | wc -l)) |
| 26 | - go test -v ./... |
| 27 | |
| 28 | # linting |
| 29 | - go tool vet -all=true -v=true . || true |
| 30 | - $(go env GOPATH | awk 'BEGIN{FS=":"} {print $1}')/bin/golint ./... |
| 31 | |
| 32 | # code coverage |
| 33 | - $(go env GOPATH | awk 'BEGIN{FS=":"} {print $1}')/bin/ginkgo -r -cover |
| 34 | - $(go env GOPATH | awk 'BEGIN{FS=":"} {print $1}')/bin/gover |
| 35 | - 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 |
| 36 | |
| 37 | env: |
| 38 | # coveralls.io |
| 39 | secure: "RCYbiB4P0RjQRIoUx/vG/AjP3mmYCbzOmr86DCww1Z88yNcy3hYr3Cq8rpPtYU5v0g7wTpu4adaKIcqRE9xknYGbqj3YWZiCoBP1/n4Z+9sHW3Dsd9D/GRGeHUus0laJUGARjWoCTvoEtOgTdGQDoX7mH+pUUY0FBltNYUdOiiU=" |