language: go

go:
  - "1.x"
  - "1.10.x"
  - "1.9.x"
  - master

services:
  - docker

script:
  - go get -u github.com/mholt/caddy
  - go test -v ./...
  - make travis-build

stages:
  - test
  - name: deploy
    if: (branch = master) AND (type != pull_request)

jobs:
  include:
    - stage: deploy
      script:
        # build caddy
        - make travis-build
        # build image and push
        - docker login --username="$DOCKER_USER" --password="$DOCKER_PASSWORD"
        - make docker
        - make docker-push

      go: 1.x

language: go

go:
  - "1.x"
  - "1.10.x"
  - master

services:
  - docker

script:
  - go get -u github.com/mholt/caddy
  - go test -v ./...
  - make travis-build

stages:
  - test
  - name: deploy
    if: (branch = master) AND (type != pull_request)

jobs:
  include:
    - stage: deploy
      script:
        # build caddy
        - make travis-build
        # build image and push
        - docker login --username="$DOCKER_USER" --password="$DOCKER_PASSWORD"
        - make docker
        - make docker-push

      go: 1.x

Remove unsupported Go version due to caddy
Remove unsupported Go version due to caddy
