Repository navigation
Expand file tree
/
Copy pathtox.ini
More file actions
171 lines (157 loc) · 4 KB
/
Copy pathtox.ini
File metadata and controls
171 lines (157 loc) · 4 KB
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
168
169
170
171
[tox]
envlist =
{py310,py311,py312,py313}-django{420}-sqlite
py313-django{420}-{mysql,mariadb,postgres}
flake8
docs
; This is not that jslint :)
jslint
templatelint
black
doc8
isort
bandit
mypy-django{420}
[testenv]
runner = uv-venv-lock-runner
passenv = *
skip_install = True
extras =
krbauth
bugzilla
socialauth
async
tests
commands = python3 -m pytest {posargs:tests/}
[testenv:py313-django{420}-mysql]
description = Run tests with a real MySQL database instance. Start the container by running "make start-testdb-mysql".
extras =
{[testenv]extras}
mysql
allowlist_externals =
bash
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:py313-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:py313-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]
runner = uv-venv-runner
basepython = python3
skip_install = True
deps = flake8==7.3.0
commands = python3 -m flake8 {posargs:src/tcms tests}
[testenv:black]
runner = uv-venv-runner
basepython = python3
skip_install = True
deps = black==22.10.0
commands = python3 -m black {posargs:src/tcms tests}
[testenv:docs]
setenv =
NITRATE_SECRET_KEY = key-for-testing-doc-build
basepython = python3
allowlist_externals = make
extras =
{[testenv]extras}
docs
changedir = {toxinidir}/docs
commands = make html
[testenv:jslint]
runner = uv-venv-runner
basepython = python3
skip_install = true
allowlist_externals =
npm
{toxinidir}/node_modules/.bin/eslint
commands_pre =
npm install
commands =
{toxinidir}/node_modules/.bin/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]
runner = uv-venv-runner
basepython = python3
skip_install = true
allowlist_externals = bash
commands = bash ./contrib/scripts/templatelint.sh src/templates/
[testenv:doc8]
runner = uv-venv-runner
basepython = python3
skip_install = true
deps = doc8==2.0.0
commands = python3 -m doc8 docs/source README.rst
[testenv:isort]
runner = uv-venv-runner
basepython = python3
skip_install = true
deps = isort==5.10.1
commands = python3 -m isort --check --diff {posargs:src/tcms tests}
[testenv:bandit]
runner = uv-venv-runner
basepython = python3
skip_install = true
deps = bandit==1.9.4
commands = python3 -m bandit -c pyproject.toml -r {posargs:src/tcms}
[testenv:mypy-django{420}]
setenv:
MYPYPATH = src
extras =
{[testenv]extras}
mypy-check
commands = python3 -m 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