khenaidoo | ab1f7bd | 2019-11-14 14:00:27 -0500 | [diff] [blame] | 1 | language: go |
| 2 | |
| 3 | go: |
| 4 | - 1.6 |
| 5 | - 1.7 |
| 6 | - 1.8 |
| 7 | - tip |
| 8 | |
| 9 | matrix: |
| 10 | allow_failures: |
| 11 | - go: tip |
| 12 | |
| 13 | gobuild_args: -race |
| 14 | |
| 15 | before_install: |
| 16 | - if [[ $TRAVIS_GO_VERSION == 1.6* ]]; then go get -u github.com/kisielk/errcheck; fi |
| 17 | - if [[ $TRAVIS_GO_VERSION == 1.6* ]]; then go get -u github.com/golang/lint/golint; fi |
| 18 | |
| 19 | before_script: |
| 20 | - '! gofmt -s -l . | read' |
| 21 | - echo $TRAVIS_GO_VERSION |
| 22 | - if [[ $TRAVIS_GO_VERSION == 1.6* ]]; then golint ./...; fi |
| 23 | - if [[ $TRAVIS_GO_VERSION == 1.6* ]]; then errcheck ./...; fi |
| 24 | - if [[ $TRAVIS_GO_VERSION == 1.6* ]]; then go tool vet .; fi |
| 25 | - if [[ $TRAVIS_GO_VERSION == 1.6* ]]; then go tool vet --shadow .; fi |
| 26 | |
| 27 | script: |
| 28 | - go test -bench . -v ./... |
| 29 | - go test -race -bench . -v ./... |