2018-11-21 22:06:03 +01:00
|
|
|
language: go
|
|
|
|
|
|
|
|
go:
|
2019-07-30 00:19:40 +02:00
|
|
|
- '1.10'
|
|
|
|
- '1.11'
|
2018-11-21 22:06:03 +01:00
|
|
|
|
|
|
|
# sudo=false makes the build run using a container
|
|
|
|
sudo: false
|
|
|
|
|
|
|
|
before_install:
|
|
|
|
- go get github.com/mattn/goveralls
|
|
|
|
- go get golang.org/x/tools/cmd/cover
|
|
|
|
- go get golang.org/x/tools/cmd/goimports
|
|
|
|
- go get github.com/golang/lint/golint
|
|
|
|
script:
|
|
|
|
- gofiles=$(find ./ -name '*.go') && [ -z "$gofiles" ] || unformatted=$(goimports -l $gofiles) && [ -z "$unformatted" ] || (echo >&2 "Go files must be formatted with gofmt. Following files has problem:\n $unformatted" && false)
|
|
|
|
- golint ./... # This won't break the build, just show warnings
|
2019-07-30 00:19:40 +02:00
|
|
|
- $HOME/gopath/bin/goveralls -service=travis-ci
|