sudo: required
dist: trusty

language: go

go:
  - 1.6
  - tip

env:
  global:
    - BACKEND="$HOME/gopath/src/github.com/seadsystem/Backend"
    - API="$TRAVIS_BUILD_DIR/DB/api"
    - LZONE="$BACKEND/DB/landingzone"

addons:
  apt:
    packages:
    - libpq-dev
    - python3-numpy
    - python3-psycopg2

install:
  - go get github.com/olt/libpq
  - go get github.com/DATA-DOG/go-sqlmock
  - go get golang.org/x/tools/cmd/cover
  - go get github.com/codecov/example-go
  - python3 -V
  - sudo apt-get install -y python3-pip
  - sudo -H pip3 install -U matplotlib
  - sudo -H pip3 install coveralls

before_script:
  - cd "$LZONE"; go install

script:
  - go vet "$LZONE/..."
  - "$GOPATH/src/github.com/codecov/example-go/go.test.sh"
  - cd "$API"; coverage run --include="$API/*.py" -m unittest discover

after_success:
  - cd "$API"; coveralls
  - rm "$API/.coverage"
  - bash <(curl -s https://codecov.io/bash)

sudo: required
dist: trusty

language: go

go:
  - 1.6
  - tip

env:
  global:
    - BACKEND="$HOME/gopath/src/github.com/seadsystem/Backend"
    - API="$BACKEND/DB/api"
    - LZONE="$BACKEND/DB/landingzone"

addons:
  apt:
    packages:
    - libpq-dev
    - python3-numpy
    - python3-psycopg2

install:
  - go get github.com/olt/libpq
  - go get github.com/DATA-DOG/go-sqlmock
  - go get golang.org/x/tools/cmd/cover
  - go get github.com/codecov/example-go
  - python3 -V
  - sudo apt-get install -y python3-pip
  - sudo -H pip3 install -U matplotlib
  - sudo -H pip3 install coveralls

before_script:
  - cd "$LZONE"; go install

script:
  - go vet "$LZONE/..."
  - "$GOPATH/src/github.com/codecov/example-go/go.test.sh"
  - cd "$API"; coverage run --include="$API/*.py" -m unittest discover

after_success:
  - coveralls
  - rm "$API/.coverage"
  - bash <(curl -s https://codecov.io/bash)

Revert "Make API tests use TRAVIS_BUILD_DIR in an attempt to allow viewing Python source code in coveralls."
Revert "Make API tests use TRAVIS_BUILD_DIR in an attempt to allow viewing Python source code in coveralls."

This reverts commit 14c7d567bc903318494574f791e57bc34febdcef.
