sudo: required

language: go

go:
  - 1.8

services:
  - docker

install:
  - go get -v -d ./...

before_script:
  - go get github.com/mattn/goveralls
  - go get github.com/alecthomas/gometalinter
  - gometalinter --install

script:
  - go test -v -coverprofile=fibgo.coverprofile
  - gometalinter ./...
  - go install -v ./...
  - docker build -t fibgo .
  - docker run -d --name fibgo-server -p 127.0.0.1:8080:8080 fibgo
  - curl --fail http://127.0.0.1:8080/numbers || exit 1

after_success:
  - goveralls -coverprofile=fibgo.coverprofile -service=travis-ci
  - if [ "$TRAVIS_BRANCH" == "master" ]; then
      docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD";
      docker tag fibgo uudashr/fibgo;
      docker push uudashr/fibgo;
    fi

after_script:
  - docker stop fibgo-server && docker rm -v fibgo-server

sudo: required

language: go

go:
  - 1.8

services:
  - docker

install:
  - go get -v ./...

before_script:
  - go get github.com/mattn/goveralls
  - go get github.com/alecthomas/gometalinter
  - gometalinter --install

script:
  - go test -v -coverprofile=fibgo.coverprofile
  - gometalinter ./...
  - go install -v ./...
  - docker build -t fibgo .
  - docker run -d --name fibgo-server -p 127.0.0.1:8080:8080 fibgo
  - curl --fail http://127.0.0.1:8080/numbers || exit 1

after_success:
  - goveralls -coverprofile=fibgo.coverprofile -service=travis-ci
  - if [ "$TRAVIS_BRANCH" == "master" ]; then
      docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD";
      docker tag fibgo uudashr/fibgo;
      docker push uudashr/fibgo;
    fi

after_script:
  - docker stop fibgo-server && docker rm -v fibgo-server

Remove the go get -d options
Remove the go get -d options
