[tox]
envlist = py27-{sqlite,postgres}, py362-{sqlite,postgres}

[testenv]
passenv = POSTGRES_URI

deps =
  setuptools>=36
  pip>=9

whitelist_externals =
  make

commands =
  pip install -e .[dev]

  # Run tests
  py.test --tb=short --junitxml=junit-{envname}.xml .

  # Run lint
  make lint-ci

setenv =
  py27-postgres: SQLALCHEMY_DATABASE_URI = {env:POSTGRES_URI:postgres://localhost/abilian_core_test}
  py36-postgres: SQLALCHEMY_DATABASE_URI = {env:POSTGRES_URI:postgres://localhost/abilian_core_test}

