Update to opendev.org in tox.ini
[functest-xtesting.git] / tox.ini
1 [tox]
2 envlist = docs,pep8,pylint,yamllint,ansiblelint,bashate,py27,perm,cover
3 skipsdist = True
4
5 [testenv]
6 usedevelop = True
7 deps =
8   -c{toxinidir}/upper-constraints.txt
9   -chttps://opendev.org/openstack/requirements/raw/branch/stable/queens/upper-constraints.txt
10   -r{toxinidir}/requirements.txt
11   -r{toxinidir}/test-requirements.txt
12 install_command = pip install {opts} {packages}
13 commands = nosetests --with-xunit \
14   --with-coverage \
15   --cover-tests \
16   --cover-package=xtesting \
17   --cover-xml \
18   --cover-html \
19   xtesting/tests/unit
20
21 [testenv:docs]
22 basepython = python2.7
23 commands =
24   doc8 README.rst api --ignore-path api/build
25   sphinx-build -W -b html api/ api/build
26
27 [testenv:pep8]
28 basepython = python2.7
29 commands = flake8
30
31 [testenv:pylint]
32 basepython = python2.7
33 whitelist_externals = bash
34 commands =
35   pylint --disable=locally-disabled --ignore-imports=y --reports=n xtesting
36
37 [testenv:yamllint]
38 basepython = python2.7
39 files =
40   .travis.yml
41   ansible
42   xtesting/ci
43 commands =
44   yamllint -s {[testenv:yamllint]files}
45
46 [testenv:ansiblelint]
47 basepython = python2.7
48 commands =
49   ansible-lint ansible/site.yml
50
51 [testenv:py36]
52 commands = nosetests xtesting/tests/unit
53
54 [testenv:bashate]
55 basepython = python2.7
56 files =
57   build.sh
58 commands = bashate {[testenv:bashate]files}
59
60 [testenv:cover]
61 basepython = python2.7
62 dirs =
63   xtesting/tests/unit/ci
64   xtesting/tests/unit/core
65   xtesting/tests/unit/energy
66   xtesting/tests/unit/utils/test_decorators.py
67 commands = nosetests --with-coverage --cover-tests \
68   --cover-package xtesting.core \
69   --cover-package xtesting.energy \
70   --cover-package xtesting.tests.unit \
71   --cover-package xtesting.utils.decorators \
72   --cover-min-percentage 100 {[testenv:cover]dirs}
73
74 [testenv:perm]
75 basepython = python2.7
76 whitelist_externals = bash
77 path=. -not -path './.tox/*' -not -path './.git/*' -not -path './doc/reveal.js/*'
78 commands =
79   bash -c "\
80     find {[testenv:perm]path} \( -type f -not -perm 644 -o -type d -not -perm 755 \) \
81     -exec ls -l \{\} + | grep '.' && exit 1 || exit 0"
82   bash -c "\
83     find {[testenv:perm]path} -exec file \{\} + | grep CRLF && exit 1 || exit 0"