forked from podengo-project/ipa-hcc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
116 lines (103 loc) · 2.3 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
[tox]
envlist = py,py36,py39,ruff,format,mypy,jslint,yamllint,pylint,rpkg,maketest,cov
[testenv]
passenv = HOME
deps =
coverage[toml]
commands =
{envpython} -m compileall -q tests/ src/
{envpython} -Wignore -m coverage run -m unittest discover -v -s tests/ {posargs}
# Fedora 37
[testenv:py]
# load ipaclient, ipaserver from global site-packages
sitepackages = true
# RHEL 8
[testenv:py36]
sitepackages = true
# RHEL 9
[testenv:py39]
sitepackages = true
[testenv:cov]
depends = py,py36
deps =
coverage[toml]
commands =
{envpython} -m coverage combine
{envpython} -m coverage html
{envpython} -m coverage report
[testenv:ruff]
skipsdist = true
skip_install = true
deps =
ruff
commands =
ruff {posargs:check .}
[testenv:pylint]
sitepackages = true
deps =
pylint
commands =
{envpython} -m pylint \
ipahcc \
ipahcc_auto_enrollment \
src/ipaserver/install/plugins/update_hcc_enrollment_service.py \
src/ipaserver/install/plugins/update_hcc.py \
src/ipaserver/plugins/hccconfig.py \
src/ipaserver/plugins/hcchost.py \
src/ipaserver/plugins/hccserverroles.py \
tests/conftest.py \
tests/test_autoenrollment.py \
tests/test_framework.py \
tests/test_hccapi.py \
tests/test_mockapi.py \
tests/test_registration.py \
tests/test_sign.py \
tests/tests.py
[testenv:format]
skipsdist = true
skip_install = true
deps = black
commands =
black --check --diff {posargs:.}
[testenv:jslint]
skipsdist = true
skip_install = true
deps =
changedir = {envdir}
whitelist_externals = npm
commands =
npm install --silent eslint@latest
{envdir}/node_modules/.bin/eslint \
-c {toxinidir}/.eslintrc.json \
{toxinidir}/install/server/ui/js/
[testenv:yamllint]
skipsdist = true
skip_install = true
deps = yamllint
changedir = {envdir}
commands =
{envpython} -m yamllint --strict .
[testenv:rpkg]
skipsdist = true
skip_install = true
deps =
whitelist_externals = make
commands =
make rpkg
[testenv:maketest]
skipsdist = true
skip_install = true
deps =
whitelist_externals = make
commands =
make test
[testenv:mypy]
sitepackages = true
skipsdist = true
deps =
mypy >= 1.2.0
types-jsonschema
types-requests
types-setuptools
commands =
{envpython} -m mypy src