language: go

sudo: false

os:
  - linux
  - osx

go:
  - 1.9.x
  - 1.10.x
  - 1.11.x
  - master

install:
 - go get ./...
 - go get -u golang.org/x/lint/golint
 - go get -u golang.org/x/tools/cmd/goimports

script:
 - go vet ./...
 - diff <(goimports -d .) <(printf "")
 - diff <(golint ./...) <(printf "")
 - go test -v -cpu=2 ./...
 - go test -v -cpu=1,2,4 -short -race ./...
 
matrix:
  allow_failures:
    - go: 'master'
  fast_finish: true 
