language: go

sudo: false

os:
  - linux
  - osx

go:
  - 1.7.x
  - 1.8.x
  - 1.9.x
  - tip

before_install:
  # our 'canonical import path' is gopkg.in-based, not github.com
  - export CANONICAL_IMPORT=${GOPATH}/src/gopkg.in/kothar/go-backblaze.v0
  - mkdir -p ${CANONICAL_IMPORT}
  - rsync -az ${TRAVIS_BUILD_DIR}/ ${CANONICAL_IMPORT}/
  - cd ${CANONICAL_IMPORT}
  - rm -rf ${TRAVIS_BUILD_DIR}
  - export TRAVIS_BUILD_DIR=${CANONICAL_IMPORT}

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

script:
 - go vet ./...
 - diff <(goimports -l . | grep -v _ffjson.go) <(printf "")
 - diff <(golint ./... | grep -v _ffjson.go) <(printf "")
 - go test -v -cpu=2 ./...
 - go test -v -cpu=1,2,4 -short -race ./...
language: go

sudo: false

os:
  - linux
  - osx

go:
  - 1.7.x
  - 1.8.x
  - 1.9.x
  - 1.10.x
  - 1.11.x

before_install:
  # our 'canonical import path' is gopkg.in-based, not github.com
  - export CANONICAL_IMPORT=${GOPATH}/src/gopkg.in/kothar/go-backblaze.v0
  - mkdir -p ${CANONICAL_IMPORT}
  - rsync -az ${TRAVIS_BUILD_DIR}/ ${CANONICAL_IMPORT}/
  - cd ${CANONICAL_IMPORT}
  - rm -rf ${TRAVIS_BUILD_DIR}
  - export TRAVIS_BUILD_DIR=${CANONICAL_IMPORT}

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

script:
 - go vet ./...
 - diff <(goimports -l . | grep -v _ffjson.go) <(printf "")
 - diff <(golint ./... | grep -v _ffjson.go) <(printf "")
 - go test -v -cpu=2 ./...
 - go test -v -cpu=1,2,4 -short -race ./...
Use specific go versions in CI
Use specific go versions in CI
