forked from warpnet/salt-lint
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
71 lines (59 loc) · 1.79 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
# Tox (http://tox.testrun.org/) is a tool for running tests in
# multiple virtualenvs. This configuration file will run the
# test suite on all supported python versions. To use it, "pip
# install tox" and then run "tox" from this directory.
[tox]
envlist = lint,{py36,py37,py38,py39,py310,py311}-install,mypy
skip_missing_interpreters = True
[testenv]
deps =
coverage
flake8
pytest
pytest-cov
commands =
{envpython} -m pytest tests/unit \
{posargs:\
--cov saltlint \
--cov-report term-missing:skip-covered \
--cov-report xml:.test-results/pytest/cov.xml \
--no-cov-on-fail}
[testenv:install]
skip_install = True
commands =
python setup.py bdist_wheel
pip install --no-index --find-links=dist salt-lint
[testenv:py36-install]
skip_install = {[testenv:install]skip_install}
commands = {[testenv:install]commands}
[testenv:py37-install]
skip_install = {[testenv:install]skip_install}
commands = {[testenv:install]commands}
[testenv:py38-install]
skip_install = {[testenv:install]skip_install}
commands = {[testenv:install]commands}
[testenv:py39-install]
skip_install = {[testenv:install]skip_install}
commands = {[testenv:install]commands}
[testenv:py310-install]
skip_install = {[testenv:install]skip_install}
commands = {[testenv:install]commands}
[testenv:py311-install]
skip_install = {[testenv:install]skip_install}
commands = {[testenv:install]commands}
[testenv:lint]
description = Run all linters
basepython = python3
deps =
pre-commit>=2.6.0
commands =
{envpython} -m pre_commit run {posargs:--all-files --hook-stage manual -v}
passenv =
PRE_COMMIT_HOME
[testenv:mypy]
description = Check Python type hints
basepython = python3
deps = mypy
commands =
mypy --config-file=tox.ini --install-types --non-interactive saltlint tests
[mypy]