.travis.yml 771 B

1234567891011121314151617181920212223242526272829
  1. language: go
  2. sudo: false
  3. go:
  4. - 1.10.x
  5. - 1.11.x
  6. - 1.12.x
  7. - 1.13.x
  8. - 1.14.x
  9. - 1.15.x
  10. cache:
  11. directories:
  12. - $HOME/.cache/go-build
  13. - $HOME/gopath/pkg/mod
  14. env:
  15. global:
  16. - GO111MODULE=on
  17. before_install:
  18. - go get github.com/mattn/goveralls
  19. - go get golang.org/x/tools/cmd/cover
  20. - go get golang.org/x/tools/cmd/goimports
  21. - go get golang.org/x/lint/golint
  22. script:
  23. - 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)
  24. - golint ./... # This won't break the build, just show warnings
  25. - $HOME/gopath/bin/goveralls -service=travis-ci