language: python

python:
  - "2.7"

sudo: false
cache: pip

addons:
  postgresql: "9.2" # minimal postgresql version for the daterange method
  apt:
    packages:
      - expect-dev  # provides unbuffer utility
      - python-lxml  # because pip installation is slow
      # needed because server-tools is loaded in the dependency chain
      - unixodbc-dev
      - python-mysqldb

env:
  global:
  - VERSION="10.0" TESTS="0" LINT_CHECK="0" TRANSIFEX="0" UNIT_TEST="0"
#  - TRANSIFEX_USER='transbot@odoo-community.org'
#  - secure: "XLhGdCIh86zcqww9qBpnk8Xqsf1Pcgw9SKr7X0KYBHJofHj4Z6Kq/oVFjpZ1LSjadsaABKbwY7h4hvKEpxZwptCv+fNTOKYy7hXFLGYnDeNeWu4zA4LI7TA5uPvyZjZ+g2xc+9dzR/VbfRHNqjvmgiEidxxqLeOnNFZ5CHdOdCw="
  matrix:
  # Option temporarily disabled
  #- LINT_CHECK="1"
  - TESTS="1" ODOO_REPO="odoo/odoo"
  - TESTS="1" ODOO_REPO="OCA/OCB"

virtualenv:
  system_site_packages: true

install:
  - git clone https://github.com/OCA/maintainer-quality-tools.git ${HOME}/maintainer-quality-tools --depth=1
  - export PATH=${HOME}/maintainer-quality-tools/travis:${PATH}
  - travis_install_nightly
  - git clone -b ${VERSION} https://github.com/OCA/web.git ${HOME}/dependencies/web --depth=1
  - git clone -b ${VERSION} https://github.com/OCA/partner-contact.git ${HOME}/dependencies/partner-contact --depth=1
  - git clone -b ${VERSION} https://github.com/OCA/account-payment.git ${HOME}/dependencies/account_payment_return --depth=1

script:
  - travis_wait travis_run_tests

after_success:
  - travis_after_tests_success
