Verify missing yaml files via yamllint
[functest-xtesting.git] / tox.ini
1 [tox]
2 envlist = docs,pep8,pylint,yamllint,bashate,py27,perm,cover
3 skipsdist = True
4
5 [testenv]
6 usedevelop = True
7 deps =
8   -c{toxinidir}/upper-constraints.txt
9   -chttps://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=stable/queens
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   xtesting/ci
42 commands =
43   yamllint -s {[testenv:yamllint]files}
44
45 [testenv:py36]
46 commands = nosetests xtesting/tests/unit
47
48 [testenv:bashate]
49 basepython = python2.7
50 files =
51   build.sh
52 commands = bashate {[testenv:bashate]files}
53
54 [testenv:cover]
55 basepython = python2.7
56 dirs =
57   xtesting/tests/unit/ci
58   xtesting/tests/unit/core
59   xtesting/tests/unit/energy
60   xtesting/tests/unit/utils/test_decorators.py
61 commands = nosetests --with-coverage --cover-tests \
62   --cover-package xtesting.core \
63   --cover-package xtesting.energy \
64   --cover-package xtesting.tests.unit \
65   --cover-package xtesting.utils.decorators \
66   --cover-min-percentage 100 {[testenv:cover]dirs}
67
68 [testenv:perm]
69 basepython = python2.7
70 whitelist_externals = bash
71 path=. -not -path './.tox/*' -not -path './.git/*' -not -path './doc/reveal.js/*'
72 commands =
73   bash -c "\
74     find {[testenv:perm]path} \( -type f -not -perm 644 -o -type d -not -perm 755 \) \
75     -exec ls -l \{\} + | grep '.' && exit 1 || exit 0"
76   bash -c "\
77     find {[testenv:perm]path} -exec file \{\} + | grep CRLF && exit 1 || exit 0"