ara/tox.ini
David Moreau Simard 6d00938099
Make API server deps optional, move them to extras
This makes it so "pip install ara" would only install a minimal
amount of dependencies (pbr and requests as of this commit) required
for running the Ansible callback plugin as well as ara_record.

The server dependencies can be installed by running
"pip install ara[server]".

Fixes: https://github.com/ansible-community/ara/issues/36
Change-Id: I67769d28ec24cade7753230dffd0b049358af29a
2019-05-03 16:01:30 -04:00

52 lines
1.2 KiB
INI

[tox]
minversion = 2.0
envlist = py3,pep8
skipdist = True
[testenv]
basepython = python3
sitepackages = False
usedevelop = True
install_command = pip install -U {opts} {packages} -c{env:CONSTRAINTS_FILE:/dev/null}
setenv = VIRTUAL_ENV={envdir}
deps = -r{toxinidir}/test-requirements.txt
extras = server
[testenv:venv]
commands = {posargs}
[testenv:docs]
commands = sphinx-build -W -b html doc/source doc/build/html
[testenv:linters]
commands = {toxinidir}/tests/linters.sh
[testenv:py3]
commands = ara-manage test ara
setenv =
ARA_DEBUG=true
ARA_LOG_LEVEL=DEBUG
ARA_BASE_DIR={env:ARA_BASE_DIR:{envtmpdir}}
[testenv:runserver]
commands =
ara-manage migrate
ara-manage runserver
setenv =
ARA_DEBUG=true
ARA_LOG_LEVEL=DEBUG
ARA_BASE_DIR={env:ARA_BASE_DIR:{envtmpdir}}
[testenv:ansible-integration]
deps = ansible
commands =
ansible-playbook -i localhost, --connection=local \
{toxinidir}/playbooks/ara_tests.yaml -e ara_tests_root={envtmpdir} {posargs}
[testenv:cover]
commands =
coverage erase
coverage run {toxinidir}/ara/server/__main__.py test ara/server
coverage run -a {toxinidir}/ara/server/__main__.py test ara/api
coverage html