language: go
go:
 - "1.10.3"
sudo: required
services:
  - docker
env:
  - "PATH=/home/travis/gopath/bin:$PATH"
before_install:
  - go get github.com/tcnksm/ghr
  - go get github.com/axw/gocov/gocov
  - go get github.com/mattn/goveralls
script:
  - diff -u <(echo -n) <(gofmt -d -s $(find . -type f -name '*.go' -not -path "./vendor/*" -not -path "./pb/*"))
  - cd $TRAVIS_BUILD_DIR && go test -coverprofile=coverage.out ./...
  - goveralls -coverprofile=coverage.out -service travis-ci
after_success:
  # Build the snap.
  - docker run -v $(pwd):/cwd snapcore/snapcraft sh -c 'cd /cwd && sudo apt update && snapcraft'
  - ./deploy.sh

language: go
go:
 - "1.10.3"
sudo: required
services:
  - docker
env:
  - "PATH=/home/travis/gopath/bin:$PATH"
before_install:
  - go get github.com/tcnksm/ghr
  - go get github.com/axw/gocov/gocov
  - go get github.com/mattn/goveralls
script:
  - diff -u <(echo -n) <(gofmt -d -s $(find . -type f -name '*.go' -not -path "./vendor/*" -not -path "./pb/*"))
  - cd $TRAVIS_BUILD_DIR && go test -i && go test -coverprofile=coverage.out ./...
  - goveralls -coverprofile=coverage.out -service travis-ci
after_success:
  # Build the snap.
  - docker run -v $(pwd):/cwd snapcore/snapcraft sh -c 'cd /cwd && sudo apt update && snapcraft'
  - ./deploy.sh

Install test dependencies before running tests to potentially save time.
BUILD: Install test dependencies before running tests to potentially save time.
