-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathtox.ini
112 lines (96 loc) · 3.21 KB
/
tox.ini
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
103
104
105
106
107
108
109
110
111
112
[tox]
minversion = 3.18.0
envlist = py3,pep8
ignore_basepython_conflict=true
[testenv]
usedevelop = True
basepython = python3
setenv = VIRTUAL_ENV={envdir}
NOSE_WITH_OPENSTACK=1
NOSE_OPENSTACK_COLOR=1
NOSE_OPENSTACK_RED=0.05
NOSE_OPENSTACK_YELLOW=0.025
NOSE_OPENSTACK_SHOW_ELAPSED=1
DJANGO_SETTINGS_MODULE=ironic_ui.test.settings
deps = -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
allowlist_externals = {toxinidir}/manage.py
commands =
{toxinidir}/manage.py test ironic_ui --settings=ironic_ui.test.settings --exclude-tag integration
[testenv:integration]
# Run integration tests only
passenv = AVCONV_INSTALLED
setenv =
PYTHONHASHSEED=0
INTEGRATION_TESTS=1
SELENIUM_HEADLESS=1
HORIZON_INTEGRATION_TESTS_CONFIG_FILE=ironic_ui/test/integration/horizon.conf
commands = python manage.py test ironic_ui.test.integration --settings=ironic_ui.test.settings --tag integration
[testenv:pep8]
commands = flake8 {posargs}
[testenv:venv]
commands = {posargs}
[testenv:py3-dev]
commands =
pip install {env:HORIZON_REPO:git+https://opendev.org/openstack/horizon}
{[testenv]commands}
[testenv:npm]
passenv =
HOME
DISPLAY
commands =
nodeenv -p
npm install
npm run {posargs:test}
[testenv:cover]
commands =
coverage erase
coverage run --source=ironic_ui {toxinidir}/manage.py test ironic_ui.test.tests --settings=ironic_ui.test.settings {posargs}
coverage xml
coverage html -d ./cover --omit='*tests*'
[testenv:docs]
deps =
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/doc/requirements.txt
commands =
sphinx-build -W -b html doc/source doc/build/html
[testenv:pdf-docs]
deps = {[testenv:docs]deps}
allowlist_externals = make
commands =
sphinx-build -W -b latex doc/source doc/build/pdf
make -C doc/build/pdf
[testenv:debug]
commands = oslo_debug_helper -t ironic_ui/test/tests {posargs}
[flake8]
show-source = True
builtins = _
# [W503] Line break before binary operator.
ignore = W503
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build
[testenv:releasenotes]
deps =
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/doc/requirements.txt
commands = sphinx-build -a -W -E -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
[testenv:extractmessages]
commands =
pybabel extract -F babel-django.cfg \
-o ironic_ui/locale/django.pot \
-k gettext_noop -k gettext_lazy -k ngettext_lazy:1,2 \
-k npgettext:1c,2,3 -k pgettext_lazy:1c,2 -k npgettext_lazy:1c,2,3 \
--add-comments Translators: ironic_ui
pybabel extract -F babel-djangojs.cfg \
-o ironic_ui/locale/djangojs.pot \
-k gettext_noop -k gettext_lazy -k ngettext_lazy:1,2 \
-k npgettext:1c,2,3 -k pgettext_lazy:1c,2 -k npgettext_lazy:1c,2,3 \
--add-comments Translators: ironic_ui
[testenv:codespell]
description =
Run codespell to check spelling
deps = codespell
# note(JayF): {posargs} lets us run `tox -ecodespell -- -w` to get codespell
# to correct spelling issues in our code it's aware of.
commands =
codespell {posargs}