-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
83 lines (72 loc) · 2.15 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
[tox]
# Ensure 1.6+ is used to support 'skipsdist'
# Ensure 1.9+ is used to support dependencies without toxinidir - bug T125705
minversion = 1.9
skipsdist = True
envlist = commit-message,lint,shellcheck,zuul_tests
# Virtualenv 20.21.1 is the last supporting Python 2.7 which we need to run Zuul
requires = virtualenv<20.22.0
[testenv]
basepython = python3
[testenv:zuul_tests]
setenv =
NOSE_ATTR = !qa
# Zuul requires python 2.7
basepython = python2.7
commands = nosetests {posargs}
deps =
chardet<4
nose
PyYAML<4
# python-debian 0.1.40 broke Python 2.7 support
python-debian==0.1.39
git+https://gerrit.wikimedia.org/r/integration/zuul.git#egg=zuul
{[testenv:jenkins-jobs]deps}
[testenv:commit-message]
commands = commit-message-validator
deps = commit-message-validator
[testenv:shellcheck]
commands = /bin/bash -c 'shellcheck --color=always $(git ls-files "*.bash" "*.sh")'
deps = shellcheck-py==0.8.0.4
allowlist_externals = /bin/bash
[testenv:lint]
# Zuul requires python 2.7 we thus want to run flake8 with py27
basepython = python2.7
commands =
/bin/bash -c "ec $(git ls-files -- ':!*/changelog' ':!*.py' ':!*.yaml' ':!*.rb')"
/bin/bash -c "ec -disable-indentation $(git ls-files '*/changelog' '*.py' '*.yaml' ':*.rb')"
flake8 {posargs}
deps =
editorconfig-checker==2.4.0
flake8==3.7.7
allowlist_externals = /bin/bash
[testenv:jenkins-jobs]
commands = jenkins-jobs {posargs}
deps =
jenkins-job-builder==4.3.0
diff-highlight==1.2.0
# Somehow broke jenkins-job-builder when running utils/shellcheck.
importlib-metadata<5
# Broken with requests 2.30 T335977
urllib3<2
[testenv:archive-repo]
deps = Levenshtein
commands = {toxinidir}/utils/archive-repo.py {posargs}
allowlist_externals = {toxinidir}/utils/archive-repo.py
[testenv:qa]
setenv =
NOSE_ATTR = qa
# Zuul logging is way to spammy
NOSE_NOLOGCAPTURE = 1
NOSE_WITH_XUNIT = 1
NOSE_XUNIT_FILE = log/junit-qa.xml
# Zuul requires python 2.7
basepython = python2.7
whitelist_externals = mkdir
deps = {[testenv:zuul_tests]deps}
commands =
mkdir -p log
nosetests {posargs}
[flake8]
ignore = W503, E123, F405, E402
max-line-length = 100