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-matplotlib
    - python3-coverage

install:
  - go get github.com/olt/libpq
  - go get github.com/DATA-DOG/go-sqlmock
  - go get github.com/axw/gocov/gocov
  - go get github.com/mattn/goveralls
  - go get golang.org/x/tools/cmd/cover
  - python3 -V
  - sudo apt-get install -y python3-pip
  - sudo -H pip3 install -U pip
  - sudo -H pip3 install -U psycopg2
  - sudo -H pip3 install -U numpy
  - sudo -H pip3 install -U matplotlib
  - sudo -H pip3 install -U codecov

before_script:
  - go vet "$LZONE/..."

script:
  - cd "$LZONE"; go install
  - cd "$API"; python3-coverage run --include="$(pwd)/*.py" -m unittest discover

after_success:
  - cd "$BACKEND"; go test "$LZONE/..."
  - cd "$LZONE"; ./test-coverage.sh
  - cd "$API"; codecov

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-matplotlib
    - python3-coverage

install:
  - go get github.com/olt/libpq
  - go get github.com/DATA-DOG/go-sqlmock
  - go get github.com/axw/gocov/gocov
  - go get github.com/mattn/goveralls
  - go get golang.org/x/tools/cmd/cover
  - python3 -V
  - sudo apt-get install -y python3-pip
  - sudo -H pip3 install -U pip
  - sudo -H pip3 install -U psycopg2
  - sudo -H pip3 install -U numpy
  - sudo -H pip3 install -U matplotlib
  - pip3 install --user codecov

before_script:
  - go vet "$LZONE/..."

script:
  - cd "$LZONE"; go install
  - cd "$API"; /usr/bin/python3-coverage run --include="$(pwd)/*.py" -m unittest discover

after_success:
  - cd "$BACKEND"; go test "$LZONE/..."
  - cd "$LZONE"; ./test-coverage.sh
  - cd "$API"; codecov

Install codecov as a user.
Install codecov as a user.
