forked from Nitrate/Nitrate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
167 lines (153 loc) · 3.74 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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
[tox]
envlist =
{py39,py310,py311,py312}-django{420}-sqlite
py312-django{420}-{mysql,mariadb,postgres}
flake8
docs
; This is not that jslint :)
jslint
templatelint
black
doc8
isort
bandit
mypy-django{420}
[testenv]
passenv = *
deps =
django420: Django>=4.2,<4.3
usedevelop = True
extras =
async
bugzilla
krbauth
tests
commands = py.test {posargs:tests/}
[testenv:py312-django{420}-mysql]
description = Run tests with a real MySQL database instance. Start the container by running "make start-testdb-mysql".
allowlist_externals =
bash
extras =
{[testenv]extras}
mysql
setenv =
NITRATE_DB_ENGINE = mysql
NITRATE_DB_HOST = 127.0.0.1
NITRATE_DB_PORT = 33062
NITRATE_DB_USER = root
NITRATE_DB_PASSWORD = pass
commands_pre =
bash {toxinidir}/contrib/scripts/adjust_mysql_auth_plugin.sh root pass
[testenv:py312-django{420}-mariadb]
description = Run tests with a real MariaDB database instance. Start the container by running "make start-testdb-mariadb".
extras =
{[testenv]extras}
mysql
setenv =
NITRATE_DB_ENGINE = mysql
NITRATE_DB_HOST = 127.0.0.1
NITRATE_DB_PORT = 33061
NITRATE_DB_USER = root
NITRATE_DB_PASSWORD = pass
[testenv:py312-django{420}-postgres]
description = Run tests with a real PostgreSQL database instance. Start the container by running "make start-testdb-pgsql".
extras =
{[testenv]extras}
pgsql
setenv =
NITRATE_DB_ENGINE = pgsql
NITRATE_DB_HOST = 127.0.0.1
NITRATE_DB_PORT = 54321
NITRATE_DB_USER = postgres
NITRATE_DB_PASSWORD = pass
NITRATE_DB_NAME = postgres
[testenv:flake8]
basepython = python3
skip_install = True
deps = flake8<6.0.0
commands = flake8 src/
[testenv:black]
basepython = python3
skip_install = True
deps = black==22.10.0
commands = black {posargs:src/tcms tests}
[testenv:docs]
setenv =
NITRATE_SECRET_KEY = key-for-testing-doc-build
basepython = python3
whitelist_externals = make
usedevelop = True
extras =
docs
async
bugzilla
changedir = {toxinidir}/docs
commands = make html
[testenv:jslint]
basepython = python3
skip_install = true
whitelist_externals = eslint
commands =
eslint \
src/static/js/nitrate.advanced-search.js \
src/static/js/nitrate.attachments.js \
src/static/js/nitrate.core.js \
src/static/js/nitrate.footer.js \
src/static/js/nitrate.index.js \
src/static/js/nitrate.management.js \
src/static/js/nitrate.profiles.js \
src/static/js/nitrate.report.js \
src/static/js/nitrate.testcases.js \
src/static/js/nitrate.testplans.js \
src/static/js/nitrate.testruns.js \
tests/js/test-tcms-actions.js \
tests/js/test-testplan-actions.js
[testenv:templatelint]
basepython = python3
skip_install = true
whitelist_externals = bash
commands = bash ./contrib/scripts/templatelint.sh src/templates/
[testenv:doc8]
basepython = python3
skip_install = true
deps = doc8==0.10.1
commands = doc8 docs/source README.rst
[testenv:isort]
basepython = python3
skip_install = true
deps = isort==5.10.1
commands = isort --check --diff {posargs:src/tcms tests}
[testenv:bandit]
basepython = python3
skip_install = true
deps = bandit==1.7.4
commands = bandit -r {posargs:src/tcms}
[testenv:mypy-django{420}]
deps =
{[testenv]deps}
django420: django-stubs==4.2.7
django420: mypy>=1.7,<1.8
usedevelop = True
extras =
{[testenv]extras}
mysql
pgsql
devtools
commands = mypy {posargs:src/tcms/ tests/}
[flake8]
exclude =
.tox,
.git,
.env,
dist,
build,
src/tcms/settings/,
*sqls.py,
urls.py,
wsgi.py,
*settings.py,
*raw_sql.py,
*xml2dict*,
./docs/source/conf.py
ignore = E203,E501,W503,W504
max_line_length = 100