Add pre-commit hook for trailing-whitespace
[releng/lftools.git] / tox.ini
1 [tox]
2 minversion = 1.6
3 envlist =
4     check-hooks,
5     coala,
6     docs,
7     docs-linkcheck,
8     license,
9     py2,
10     py3
11
12 [testenv]
13 deps =
14     -r{toxinidir}/requirements.txt
15     -r{toxinidir}/requirements-openstack.txt
16     -r{toxinidir}/requirements-test.txt
17     pytest
18     pytest-click
19     pytest-datafiles
20 commands = pytest
21
22 [testenv:check-hooks]
23 deps = pre-commit
24 commands =
25     pre-commit install
26     pre-commit run --all-files
27
28 [testenv:coala]
29 basepython = python3
30 deps =
31     coala
32     coala-bears
33     nodeenv==1.1.2
34 commands =
35     nodeenv -p
36     npm install --global remark-cli remark-lint write-good
37     python3 -m nltk.downloader punkt maxent_treebank_pos_tagger averaged_perceptron_tagger
38     coala --non-interactive
39
40 [testenv:docs]
41 deps = -rrequirements-docs.txt
42 commands =
43     sphinx-build -W -b html -n -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/html
44     echo "Generated docs available in {toxinidir}/docs/_build/html"
45 whitelist_externals = echo
46
47 [testenv:docs-linkcheck]
48 deps = -rrequirements-docs.txt
49 commands = sphinx-build -W -b linkcheck -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/linkcheck
50
51 [testenv:latest-upstream]
52 deps = -r{toxinidir}/requirements-test.txt
53 commands =
54     pip install -U python-jenkins requests shade
55     pytest
56
57 [testenv:license]
58 deps =
59     lftools
60 commands =
61     lftools license check-dir lftools
62     lftools license check-dir -r '.+' shell