os:
  - osx
  - linux

language: go
go:
  - 1.11.1
services: docker

go_import_path: github.com/kubernetes-incubator/external-storage

env:
  - TEST_SUITE=osx
  - TEST_SUITE=linux-local-volume
  - TEST_SUITE=linux-everything-else
#  - TEST_SUITE=linux-nfs ETCD_VER=v3.0.14 KUBE_VERSION=1.5.4
  - TEST_SUITE=linux-nfs ETCD_VER=v3.2.18 KUBE_VERSION=1.11.2

before_install:
  - if [ "$TRAVIS_OS_NAME" = "osx" ]; then ulimit -n 8192; fi
  - if [ "$TRAVIS_OS_NAME" = "osx" ]; then mkdir -p $GOPATH/bin; fi

install: true

script:
  - ./test.sh

deploy:
  - provider: script
    script: ./deploy.sh
    on:
      tags: true
      condition: $TEST_SUITE = linux-local-volume && $TRAVIS_OS_NAME = linux
