summaryrefslogtreecommitdiff
path: root/tox.ini
blob: f0dd3085e4058c74b3395d8b34aa376a8bd55926 (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
100
101
102
[tox]
envlist = py34,py27,pep8
minversion = 1.6
skipsdist = True

[testenv]
setenv = VIRTUAL_ENV={envdir}
usedevelop = True
install_command = pip install {opts} {packages}
deps = -r{toxinidir}/requirements.txt
       -r{toxinidir}/test-requirements.txt
commands =
  find {toxinidir} -not -path '{toxinidir}/.tox/*' -name '*.pyc' -delete
  python setup.py testr --slowest --testr-args='^(?!heat_integrationtests){posargs}'

whitelist_externals =
  bash
  find
passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY

[testenv:py27log]
commands =
  find . -type f -name "*.pyc" -delete
  bash tools/pretty_tox.sh '^(?!heat_integrationtests){posargs}'

[testenv:integration]
setenv = VIRTUAL_ENV={envdir}
         OS_TEST_PATH=./heat_integrationtests
         TESTR_START_DIR=heat_integrationtests
passenv = OS_*
usedevelop = False
install_command = {toxinidir}/heat_integrationtests/install-requirements --stub {toxinidir}/heat_integrationtests/requirements.stub --source {toxinidir}/requirements.txt --source {toxinidir}/test-requirements.txt {packages} {opts}
deps = -t{toxinidir}/heat_integrationtests/requirements.txt
commands =
  bash tools/pretty_tox.sh '{posargs}'

[testenv:pep8]
commands =
    flake8 heat bin/heat-api bin/heat-api-cfn bin/heat-api-cloudwatch bin/heat-engine bin/heat-manage contrib heat_integrationtests doc/source
    python tools/custom_guidelines.py --exclude heat/engine/resources/aws

[testenv:venv]
commands = {posargs}

[testenv:cover]
commands =
  python setup.py testr --coverage --testr-args='^(?!heat_integrationtests){posargs}'

[testenv:docs]
deps = -r{toxinidir}/requirements.txt
       -r{toxinidir}/test-requirements.txt
       sphinxcontrib-httpdomain
commands = python setup.py build_sphinx

[testenv:api-ref]
# This environment is called from CI scripts to test and publish
# the API Ref to developer.openstack.org.
#
# NOTE(sdague): this target does not use constraints because
# upstream infra does not yet support it. Once that's fixed, we can
# drop the install_command.
#
# we do not used -W here because we are doing some slightly tricky
# things to build a single page document, and as such, we are ok
# ignoring the duplicate stanzas warning.
whitelist_externals = bash
                      rm
install_command = pip install -U --force-reinstall {opts} {packages}
commands =
  rm -rf api-ref/build
  sphinx-build -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html

[testenv:genconfig]
commands =
    oslo-config-generator --config-file=config-generator.conf
    oslo-config-generator --config-file=heat_integrationtests/config-generator.conf

[testenv:bandit]
deps = -r{toxinidir}/test-requirements.txt
commands = bandit -c bandit.yaml -r heat -n5 -p heat_conservative

[flake8]
show-source = true
exclude=.*,dist,*openstack/common*,*lib/python*,*egg,build,*convergence/scenarios/*
max-complexity=20

[hacking]
import_exceptions = heat.common.i18n
local-check-factory = heat.hacking.checks.factory

[testenv:debug]
commands = oslo_debug_helper {posargs}

[testenv:releasenotes]
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html

[testenv:install-guide]
# NOTE(jaegerandi): this target does not use constraints because
# upstream infra does not yet support it. Once that's fixed, we can
# drop the install_command.
install_command = pip install -U --force-reinstall {opts} {packages}
commands = sphinx-build -a -E -W -d install-guide/build/doctrees -b html install-guide/source install-guide/build/html