[tox]
envlist = py27,py35,pypy,docs,ui
skip_missing_interpreters = True

[testenv]
deps = .[dev]
install_command = pip install --process-dependency-links {opts} {packages}
passenv = TRAVIS* SQLALCHEMY_DATABASE_URI
whitelist_externals = /bin/bash
commands =
    bash -c "if [[ -v TRAVIS ]]; then celery worker --detach -A portal.celery_worker.celery --loglevel=info;fi"
    nosetests -v --with-cover --cover-package=portal --exclude test_integration []

[testenv:docs]
changedir = docs
commands = make html

[testenv:ui]
passenv = SAUCE_* {[testenv]passenv}
commands =
    bash -c "if [[ -v TRAVIS ]]; then celery worker --detach -A portal.celery_worker.celery --loglevel=info;fi"
    nosetests -v --cover-package=portal tests.test_integration []

[tox]
envlist = py27,py35,pypy,docs,ui
skip_missing_interpreters = True

[base]
commands =
    bash -c "if [[ -v TRAVIS ]]; then celery worker --detach -A portal.celery_worker.celery --loglevel=info;fi"

[testenv]
deps = .[dev]
install_command = pip install --process-dependency-links {opts} {packages}
passenv = TRAVIS* SQLALCHEMY_DATABASE_URI
whitelist_externals = /bin/bash
commands =
    {[base]commands}
    nosetests -v --with-cover --cover-package=portal --exclude test_integration []

[testenv:docs]
changedir = docs
commands = make html

[testenv:ui]
passenv = SAUCE_* {[testenv]passenv}
commands =
    {[base]commands}
    nosetests -v --cover-package=portal tests.test_integration []

Refactor celery check into common base env
Refactor celery check into common base env
