forked from wikimedia/operations-puppet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
136 lines (117 loc) · 3.94 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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
[tox]
minversion = 1.6
skipsdist = True
# Adding an environment to this list is not enough to get the tests to be
# executed on-demand by CI. You need to modify rake_modules/taskgen.rb too.
envlist = commit-message, admin, adminschema, py2-pep8, py3-pep8, mtail, nagios_common, grafana, sonofgridengine, tslua, smart_data_dump, alerts
[flake8]
max-line-length = 100
ignore =
# Default non-PEP8 ignores
# See <https://pycodestyle.readthedocs.io/en/latest/intro.html#error-codes>
E121, E123, E126, E133, E226, E241, E242, E704, W503,
# E402: module level import not at top of file
E402
exclude =
# Do not lint the tox runtime directory
.tox,
# Do not look in the standard ruby bundle directory
.bundle,
# Ignore user dotfiles and scripts
modules/admin/files/home,
# Upstream files that don't pass flake8 but should not be locally modified
modules/jupyterhub/files/jupyterhub_config.py,
modules/jupyterhub/files/nchp_config.py,
modules/letsencrypt/files/acme_tiny.py,
modules/mailman/files/mm_cfg.py,
modules/openstack/files/train/keystone/ldap-common-rocky-fixed.py,
modules/postgresql/files/check_postgres_replication_lag.py,
modules/varnish/files/varnishapi.py,
# Backported fixes for trove dns:
modules/openstack/files/victoria/trove/hacks/instance/models.py,
modules/openstack/files/victoria/trove/hacks/taskmanager/models.py,
modules/rabbitmq/files/rabbitmqadmin.py,
# additional server name validation:
modules/openstack/files/train/nova/hacks/servers.py,
modules/openstack/files/ussuri/nova/hacks/servers.py,
modules/openstack/files/victoria/nova/hacks/servers.py,
modules/backy2/files/sql.py,
# needs python3, handled by its own tox.ini
modules/envoyproxy
[testenv]
basepython = python2.7
deps =
pytest
[testenv:admin]
basepython = python3.7
deps =
{[testenv]deps}
sshpubkeys
PyYAML
commands = pytest modules/admin/data
[testenv:adminschema]
basepython = python3.7
deps =
{[testenv]deps}
PyYAML
jsonschema
yamllint
commands = python3 ./modules/admin/data/data_validate.py
[testenv:commit-message]
basepython = python3
deps = commit-message-validator>=0.7.0
commands = commit-message-validator
[testenv:py2-pep8]
basepython = python2.7
deps = flake8==3.3.0
# add --version as a fallback so `tox -r` runs clean
# ultimatly disabling checks, otherwise flake8 will bork on python3 files
commands = flake8 {posargs:{env:TOX_PY2_FILES:--version}}
[testenv:py3-pep8]
basepython = python3
deps = flake8 >=3.3.0
# add --version as a fallback so `tox -r` runs clean
# ultimatly disabling checks, otherwise flake8 will bork on python2 files
commands = flake8 {posargs:{env:TOX_PY3_FILES:--version}}
[testenv:mtail]
basepython = python3
commands = pytest modules/mtail/files
[testenv:alerts]
basepython = python3
commands = pytest modules/alerts/files
[testenv:nagios_common]
commands = pytest modules/nagios_common/files/check_commands
deps =
{[testenv]deps}
requests
prometheus_client
[testenv:grafana]
basepython = python3
# Needed for python3-ldap installed in Docker
# The alternative would be to build python-ldap in the virtualenv, thus requiring headers (e.g. -dev
# packages) in the Docker image anyways.
sitepackages = True
commands = pytest modules/grafana/files
deps =
{[testenv]deps}
requests
[testenv:sonofgridengine]
basepython = python3
commands = pytest modules/sonofgridengine/files
deps =
{[testenv]deps}
python-keystoneclient
keystoneauth1
python-novaclient
[testenv:tslua]
# sh needed to use wildcard
commands = /bin/sh -c 'busted --verbose --helper=modules/profile/files/trafficserver/mock.helper.lua --lpath=modules/profile/files/trafficserver/?.lua ./modules/profile/files/trafficserver/*.lua'
[testenv:smart_data_dump]
basepython = python3
commands = pytest modules/smart/files
deps =
{[testenv]deps}
prometheus_client
[testenv:prometheus]
basepython = python3
commands = pytest modules/prometheus/files