os: linux
sudo: false
language: go

go:
  - "1.7.x"
  - "1.8.x"
  - "1.9.x"
  - "1.10.x"
  - master

matrix:
  allow_failures:
    - go: master

branches:
  only:
    - master

notifications:
  email:
    on_success: always

install:
  - export GOBIN="$GOPATH/bin"
  - export PATH="$PATH:$GOBIN"
  - go get -u github.com/golang/lint/golint
  - go get golang.org/x/tools/cmd/goimports

script:
  - go install
  - go test -v ./...
  - go run build.go -v -T
  - diff <(goimports -d *.go) <(printf "")

after_success:
  - diff <(golint *.go) <(printf "")
