language: go

sudo: false

go:
  - 1.8.x
  - 1.9.x
  - master

services:
  - docker

cache:
  directories:
    - vendor
    - webroot/node_modules

before_install:
  - nvm install 6.11.0
  - nvm use 6.11.0
  - npm install -g yarn

install:
  - make deps-install
  - cd webroot && make yarn-install && cd ..

script:
  - make check-style
  - make test
  - make build
  - cd webroot
  - make lint
  - make build
  - cd ..
  - if [[ "$TRAVIS_GO_VERSION" =~ ^1\.8\.[0-9]+$ && "$TRAVIS_BRANCH" == "master" ]]; then
      docker build -t minchao/smsender-preview:latest .;
      docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD";
      docker images;
      docker push $DOCKER_USERNAME/smsender-preview;
    fi
language: go

sudo: false

go:
  - 1.8.x
  - 1.9.x
  - master

services:
  - docker

cache:
  directories:
    - vendor
    - webroot/node_modules

before_install:
  - nvm install 6.11.0
  - nvm use 6.11.0
  - npm install -g yarn

install:
  - make deps-install
  - cd webroot && make yarn-install && cd ..

script:
  - make check-style
  - make test
  - make build
  - cd webroot
  - make lint
  - make build
  - cd ..
  - if [[ "$TRAVIS_GO_VERSION" =~ ^1\.9(|\.[0-9]+)$ && "$TRAVIS_BRANCH" == "master" ]]; then
      docker build -t minchao/smsender-preview:latest .;
      docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD";
      docker images;
      docker push $DOCKER_USERNAME/smsender-preview;
    fi
Update the docker preview image to Go 1.9
Update the docker preview image to Go 1.9
