matrix:
  include:
    - os: linux
      go: 1.9.x
      language: go
    - os: osx
      language: go
      go: 1.9.x

install: contrib/scripts/install.sh
git:
  depth: 1000
dist: trusty
sudo: required
notifications:
  slack:
    secure: uezT1E7kSVRDC2El9g5syXb1I4JrUUJHW4PXAf0IhXDFqS1ewkrNMurbkltrsJp0OtH7r2rzewuZsxjZ8pz0D+9YPorQzCPUgSqHuYnplh5WJMiaImXVvyApOpVEIm/0mFitrhfGjtMDXegRw1Rk95ujKNokulCSlLqGT1GSKQXmRjBgPYPqPmWQUbzkvwgL6NcMODv1GLyslGGTVKY/WiSjYkiNsQbDjxED3w5rAoX1FG3pvcHAXGxSWbTEk2VzvjGuNwflK92FZZXS/NxXPdEa4lPjlFBRRTHWwEXS4qbaGrdQNJ1DFI/QWrKtw6sHpqt22ovXEk4qkVthaf6Yq8YxoBQ80ajY6gw72ZMXreN3AaHCi7thNKtj/v2e1qlxggNCA8WDnXQmQ0iCg+BYD63LsVbJqlAGq151GGGJXSTcci1DhsuT3JeYx2Vd+wIHNTuYRqFJACnA45KRyExejyzdAYvdBgMnbMbtKctKtFthB5g5P1evBvx/PmZxpXPxIhLKjlCwZgutfR2jy1YSFjIHDR3hBJGsPj1z0XLo36kTOUM/CpTzbNFe2xr3dZrNH/LwWiYO9NBeCHc6kCi6DKi7X7bvnlpk8tazHep7VDQputNWgwEu4flld8jy7QRnIDVIj+4qwT+YhUDG/2lPJ5/Agxjq7rGgkIpPc8Kd8sQ=
addons:
  apt:
    packages:
    - jq
    - graphviz
  hosts:
  - server1.dgraph.io
  - server2.dgraph.io
  artifacts:
    debug: true
    paths:
      - $TRAVIS_BUILD_DIR/dgraph/dgraph-$TRAVIS_OS_NAME-${TRAVIS_COMMIT:0:7}
env:
  global:
  - secure: VkBvETNHIhgegl3tLYI3fqDKD8CdZiYMgDCT1vetInyFjB2OQElOLD9TUwtTdWPoo9Oc/GiLJsx29yWAEVbw4nToyULDv8IbNV2IVA2FiQPijhLlwaiQxE3cbgo6e572C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ZniZihLINBP2gmILvDOFs9NwZJz4Gh1nVarBgkyAeq+IlWb4g5T4g774HBOfu/wWkWurmDG/9BISJvsLGYPgGGNCggSEDXxSD3HWSc4UfTWsjaE/987XmEvEcQ9iLkhntMq5F6mXWti2BtqKS9L2JXLzac1jKBuxcwyoKkkqfLpbums=

before_script:
- go get github.com/mattn/goveralls
script:
- bash contrib/scripts/cover.sh $HOME/build coverage.out || travis_terminate 1
- goveralls -service=travis-ci -coverprofile=coverage.out || true
- bash contrib/scripts/load-test.sh $HOME/build || travis_terminate 1
- contrib/tlstest/run.sh
- contrib/nightly/upload.sh
