Replace python test harness
[releng/lftools.git] / tox.ini
1 [tox]
2 envlist =
3     docs,
4     docs-linkcheck,
5     license,
6     pre-commit,
7     py36,
8     py37,
9     py38
10 minversion = 3.7
11 skip_missing_interpreters = true
12 ignore_basepython_conflict = true
13
14 [flake8]
15 max-complexity = 22
16 max-line-length = 120
17 ignore = E203, W503, C901, E402, B011
18
19 [pep8]
20 max-line-length = 120
21
22 [pytest]
23 markers = datafiles
24 addopts = -p no:warnings
25
26 [testenv]
27 basepython = python3
28 deps = -r{toxinidir}/requirements-test.txt
29 commands = pytest
30
31 [testenv:docs]
32 description = Build the documentation with sphinx
33 basepython = python3
34 deps = -rrequirements-docs.txt
35 extras = openstack
36 commands = sphinx-build -W -b html -n -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/html
37
38 [testenv:docs-linkcheck]
39 description = Check the documentation links with sphinx
40 basepython = python3
41 deps = -rrequirements-docs.txt
42 extras = openstack
43 commands = sphinx-build -W -b linkcheck -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/linkcheck
44
45 [testenv:latest-upstream]
46 description = Latest upstream test. Used for what exactly?
47 basepython = python3
48 deps = -r{toxinidir}/requirements-test.txt
49 commands =
50     pip install -U python-jenkins requests shade
51     pytest
52
53 [testenv:license]
54 description = Check all files for license header
55 basepython = python3
56 deps = lftools
57 commands =
58     lftools license check-dir lftools
59     lftools license check-dir -r '.+' shell
60
61 [testenv:pre-commit]
62 description = Precommit checks for black, gitlint, etc.
63 basepython = python3
64 deps = pre-commit
65 commands =
66     pre-commit run --all-files
67
68 [testenv:reno]
69 description = OpenStack Reno checks
70 basepython = python3
71 deps = reno
72 commands = reno {posargs:--help}