blob: 2fc5e5f5b57d2cdf97d04c67bdf9dbfea0469517 [file] [log] [blame]
Naveen Sampath04696f72022-06-13 15:19:14 +05301language: go
2
3os:
4 - linux
5 - osx
6
7go:
8 - 1.16.x
9
10install:
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
23script:
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
37env:
38 # coveralls.io
39 secure: "RCYbiB4P0RjQRIoUx/vG/AjP3mmYCbzOmr86DCww1Z88yNcy3hYr3Cq8rpPtYU5v0g7wTpu4adaKIcqRE9xknYGbqj3YWZiCoBP1/n4Z+9sHW3Dsd9D/GRGeHUus0laJUGARjWoCTvoEtOgTdGQDoX7mH+pUUY0FBltNYUdOiiU="