1
1
[tox]
2
+ minversion = 4
2
3
envlist =
3
4
fix
4
5
py311
@@ -13,73 +14,72 @@ envlist =
13
14
readme
14
15
isolated_build = true
15
16
skip_missing_interpreters = true
16
- minversion = 4
17
17
18
18
[testenv]
19
19
description = run tests with {basepython}
20
+ package = wheel
21
+ wheel_build_env = .pkg
22
+ extras =
23
+ testing
20
24
passenv =
21
25
PYTEST_*
22
26
setenv =
23
27
COVERAGE_FILE = {toxworkdir}{/}.coverage.{envname}
24
- extras =
25
- testing
26
28
commands =
27
29
pytest {tty:--color =yes} {posargs: \
28
30
--junitxml {toxworkdir}{/}junit.{envname}.xml --cov {envsitepackagesdir}{/}filelock --cov {toxinidir}{/}tests \
29
31
--cov-config =pyproject.toml --no-cov-on-fail --cov-report term-missing:skip-covered --cov-context =test \
30
32
--cov-report html:{envtmpdir}{/}htmlcov --cov-report xml:{toxworkdir}{/}coverage.{envname}.xml \
31
33
tests}
32
34
diff-cover --compare-branch {env:DIFF_AGAINST:origin/main} {toxworkdir}{/}coverage.{envname}.xml
33
- package = wheel
34
- wheel_build_env = .pkg
35
35
36
36
[testenv:fix]
37
37
description = format the code base to adhere to our styles, and complain about what we cannot do automatically
38
- passenv =
39
- *
40
38
basepython = python3.10
41
39
skip_install = true
42
40
deps =
43
- pre-commit>=3.2
41
+ pre-commit>=3.2.1
42
+ passenv =
43
+ *
44
44
commands =
45
45
pre-commit run --all-files --show-diff-on-failure
46
46
python -c ' import pathlib; print("hint: run \{\} install to add checks as pre-commit hook".format(pathlib.Path(r"{envdir}") / "bin" / "pre-commit"))'
47
47
48
48
[testenv:type]
49
49
description = run type check on code base
50
- setenv =
51
- {tty:MYPY_FORCE_COLOR = 1}
52
50
deps =
53
51
mypy ==1.1.1
52
+ setenv =
53
+ {tty:MYPY_FORCE_COLOR = 1}
54
54
commands =
55
55
mypy --strict src/filelock
56
56
mypy --strict tests
57
57
58
58
[testenv:coverage]
59
59
description = combine coverage files and generate diff (against DIFF_AGAINST defaulting to origin/main)
60
- passenv =
61
- DIFF_AGAINST
62
- setenv =
63
- COVERAGE_FILE = {toxworkdir}/.coverage
64
60
skip_install = true
65
61
deps =
66
62
covdefaults>=2.3
67
63
coverage[toml]>=7.2.2
68
64
diff-cover>=7.5
69
65
extras =
70
66
parallel_show_output = true
67
+ passenv =
68
+ DIFF_AGAINST
69
+ setenv =
70
+ COVERAGE_FILE = {toxworkdir}/.coverage
71
71
commands =
72
72
coverage combine
73
73
coverage report --skip-covered --show-missing
74
74
coverage xml -o {toxworkdir}/coverage.xml
75
75
coverage html -d {toxworkdir}/htmlcov
76
76
diff-cover --compare-branch {env:DIFF_AGAINST:origin/main} {toxworkdir}/coverage.xml
77
77
depends =
78
- py311
79
78
py310
80
- py39
81
- py38
79
+ py311
82
80
py37
81
+ py38
82
+ py39
83
83
pypy3
84
84
85
85
[testenv:docs]
0 commit comments