language: go

go:
  - 1.x

env:
  matrix:
  - RUN_ON_CONTAINER=ubuntu-18.04

addons:
  postgresql: "9.4"
  apt:
    packages:
    - upx-ucl
    - binutils
    - fakeroot

before_install:
  - go get github.com/axw/gocov/gocov
  - go get github.com/mattn/goveralls
  - go get golang.org/x/tools/cmd/cover
  - gem install package_cloud
  - pip install --user requests

before_script:
  - psql -c 'create database henhouse_test;' -U postgres

script:
  - go list ./... | while read pkg; do go test -v -covermode=count -coverprofile=$(basename ${pkg}).cover ${pkg} || return 1; done
  - ls | grep cover$ | xargs cat | sort -r | uniq >> coverage.out
  - goveralls -coverprofile=coverage.out -service travis-ci
  - git clone https://github.com/jollheef/henhouse
  - git checkout ${TRAVIS_COMMIT}
  - cd henhouse
  - PATH=$HOME/.local/bin:$PATH ./package.sh

language: go

go:
  - 1.x

addons:
  postgresql: "9.4"
  apt:
    packages:
    - upx-ucl
    - binutils
    - fakeroot

before_install:
  - go get github.com/axw/gocov/gocov
  - go get github.com/mattn/goveralls
  - go get golang.org/x/tools/cmd/cover
  - gem install package_cloud
  - pip install --user requests

before_script:
  - psql -c 'create database henhouse_test;' -U postgres

script:
  - go list ./... | while read pkg; do go test -v -covermode=count -coverprofile=$(basename ${pkg}).cover ${pkg} || return 1; done
  - ls | grep cover$ | xargs cat | sort -r | uniq >> coverage.out
  - goveralls -coverprofile=coverage.out -service travis-ci
  - git clone https://github.com/jollheef/henhouse
  - git checkout ${TRAVIS_COMMIT}
  - cd henhouse
  - PATH=$HOME/.local/bin:$PATH ./package.sh

Revert "Run on Ubuntu 18.04"
Revert "Run on Ubuntu 18.04"

This reverts commit f44dfaac91f3c26c5ab333cbc4063bf0261db9b6.
