summaryrefslogtreecommitdiff
path: root/tox.ini
blob: 5dd473d18cef320d052ba39d110146c7ac2a412f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
[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

[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 = python manage.py test ara
setenv =
  ARA_CFG={toxinidir}/ara/server/configs/test.cfg

[testenv:runserver]
commands =
  python manage.py migrate
  python manage.py collectstatic --clear --no-input
  python manage.py runserver

# Temporary venv to help bootstrap integration
[testenv:ansible-integration]
deps =
  git+https://git.openstack.org/openstack/ara-plugins@master#egg=ara_plugins
  git+https://git.openstack.org/openstack/ara-clients@master#egg=ara_clients
commands =
  rm -f {toxinidir}/db.sqlite3
  bash -c 'ANSIBLE_CALLBACK_PLUGINS=$(python -c "import os,ara.plugins; print(os.path.dirname(ara.plugins.__file__))")/callback ansible-playbook {toxinidir}/hacking/test-playbook.yml'
  python {toxinidir}/hacking/validate.py
setenv =
  ARA_CFG={toxinidir}/ara/server/configs/integration.cfg
whitelist_externals =
  rm
  bash

[testenv:cover]
commands =
    coverage erase
    coverage run {toxinidir}/manage.py test ara/server
    coverage run -a {toxinidir}/manage.py test ara/api
    coverage html