dist: trusty
sudo: required

# Install Bazel and set up GOPATH.
before_install:
- go get -u github.com/alecthomas/gometalinter
- wget https://github.com/bazelbuild/bazel/releases/download/0.4.4/bazel_0.4.4-linux-x86_64.deb
- sudo dpkg -i bazel_0.4.4-linux-x86_64.deb
- mkdir -p $GOPATH/src/k8s.io
- mv $TRAVIS_BUILD_DIR $GOPATH/src/k8s.io
- cd $GOPATH/src/k8s.io/repo-infra

install:
  - gometalinter --install
  - go get -u github.com/bazelbuild/buildifier/buildifier
  - go install ./...

script:
  - verify/verify-boilerplate.sh --rootdir="$GOPATH/src/k8s.io/repo-infra" -v
  - verify/verify-go-src.sh --rootdir "$GOPATH/src/k8s.io/repo-infra" -v
  - buildifier -mode=check $(find . -name BUILD -o -name '*.bzl' -type f)
  - kazel --print-diff --validate
  - bazel build //...
