Add payload to ditribute o2ims api token to smo side.
[pti/o2.git] / tox.ini
1 # content of: tox.ini , put in same dir as setup.py
2 [tox]
3 envlist=
4     flake8,
5     code,
6     docs,
7     docs-linkcheck,
8
9 minversion = 2.0
10 skipsdist = True
11
12 [testenv]
13 basepython =
14     code: python3.8
15     flake8: python3.8
16 setenv =
17         VIRTUAL_ENV={envdir}
18
19 # NOTE: relative paths were used due to '-w' flag for nosetests util
20
21 usedevelop = True
22 install_command = pip install -U {opts} {packages}
23 deps = -r{toxinidir}/requirements.txt
24        -r{toxinidir}/requirements-test.txt
25 whitelist_externals = bash, flake8, pytest
26
27 [testenv:clm]
28 # use pip to report dependencies with versions
29 whitelist_externals = sh
30 commands = sh -c 'pip freeze > requirements.txt'
31
32 [testenv:flake8]
33 commands =
34     flake8 o2ims
35     flake8 o2dms
36     flake8 o2common
37
38 [testenv:code]
39 setenv =
40         O2APP_CONFIG=configs/o2app.conf
41 commands =
42     pytest tests/unit
43
44 [testenv:nosetests]
45 commands =
46     pytest tests/unit
47
48
49 [testenv:docs]
50 basepython = python3
51 deps =
52     sphinx
53     sphinx-rtd-theme
54     sphinxcontrib-httpdomain
55     recommonmark
56     lfdocs-conf
57
58 commands =
59     sphinx-build -W -b html -n -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/html
60
61     echo "Generated docs available in {toxinidir}/docs/_build/html"
62
63 whitelist_externals = echo
64
65 [testenv:docs-linkcheck]
66 basepython = python3
67 deps = sphinx
68        sphinx-rtd-theme
69        sphinxcontrib-httpdomain
70        recommonmark
71        lfdocs-conf
72 commands = sphinx-build -W -b linkcheck -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/linkcheck