summaryrefslogtreecommitdiff
path: root/tox.ini
blob: df78c4713ee8c6f11f1e466ae1920785d071e7ec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
# Tox (http://tox.testrun.org/) is a tool for running tests
# in multiple virtualenvs. This configuration file will run the
# test suite on all supported python versions. To use it, "pip install tox"
# and then run "tox" from this directory.

[tox]
skipsdist = True
envlist = pep8, py27, pylint, docs, cover, pep8-py{34,35}, pylint-py{27}-{fuelweb,system,gates,fuel}
skip_missing_interpreters = True

[testenv]
deps =
    -r{toxinidir}/fuelweb_test/requirements-devops-source.txt
    -r{toxinidir}/fuelweb_test/requirements.txt
    mock>=1.2
    pytest-cov
usedevelop = False
commands =
    ./run_system_test.py show-all-groups
    # Run unit tests and coverage: groups collect does not cover API changes
    py.test --cov-config .coveragerc --cov-report html --cov=core core/_tests
    coverage html -d {envlogdir}
    coverage report --fail-under 75

[testenv:pep8]
# TODO: #deps = hacking==0.7
deps = flake8
usedevelop = False
commands =
    flake8 {posargs:.}

[testenv:pep8-py34]
# TODO: #deps = hacking==0.7
deps = flake8
usedevelop = False
commands =
    flake8 {posargs:.}

[testenv:pep8-py35]
# TODO: #deps = hacking==0.7
deps = flake8
usedevelop = False
commands =
    flake8 {posargs:.}

[flake8]
ignore = H302,H802
exclude = .venv,.git,.tox,dist,doc,*egg,build
show-pep8 = True
show-source = True
count = True

[testenv:pylint]
deps=
    {[testenv]deps}
    pylint
commands=
    pylint --rcfile=.pylintrc_gerrit fuelweb_test system_test gates_tests fuel_tests run_system_test core


[testenv:pylint-py27-fuelweb]
deps=
    {[testenv]deps}
    pylint
commands=pylint fuelweb_test

[testenv:pylint-py27-system]
deps=
    {[testenv]deps}
    pylint
commands=pylint system_test

[testenv:pylint-py27-gates]
deps=
    {[testenv]deps}
    pylint
commands=pylint gates_tests

[testenv:pylint-py27-fuel]
deps=
    {[testenv]deps}
    pylint
commands=pylint fuel_tests


[testenv:docs]
changedir = doc
deps =
    {[testenv]deps}
    sphinx
commands = sphinx-build -b html -d _build/doctrees . _build/html

[testenv:cover]
deps =
    {[testenv]deps}
commands =
    py.test --cov-config .coveragerc --cov-report html --cov=core core/_tests
    coverage html -d {envlogdir}
    coverage report --fail-under 75