11[tox]
2+ minversion = 4
23envlist =
34 fix
45 py311
@@ -13,73 +14,72 @@ envlist =
1314 readme
1415isolated_build = true
1516skip_missing_interpreters = true
16- minversion = 4
1717
1818[testenv]
1919description = run tests with {basepython}
20+ package = wheel
21+ wheel_build_env = .pkg
22+ extras =
23+ testing
2024passenv =
2125 PYTEST_*
2226setenv =
2327 COVERAGE_FILE = {toxworkdir}{/}.coverage.{envname}
24- extras =
25- testing
2628commands =
2729 pytest {tty:--color =yes} {posargs: \
2830 --junitxml {toxworkdir}{/}junit.{envname}.xml --cov {envsitepackagesdir}{/}filelock --cov {toxinidir}{/}tests \
2931 --cov-config =pyproject.toml --no-cov-on-fail --cov-report term-missing:skip-covered --cov-context =test \
3032 --cov-report html:{envtmpdir}{/}htmlcov --cov-report xml:{toxworkdir}{/}coverage.{envname}.xml \
3133 tests}
3234 diff-cover --compare-branch {env:DIFF_AGAINST:origin/main} {toxworkdir}{/}coverage.{envname}.xml
33- package = wheel
34- wheel_build_env = .pkg
3535
3636[testenv:fix]
3737description = format the code base to adhere to our styles, and complain about what we cannot do automatically
38- passenv =
39- *
4038basepython = python3.10
4139skip_install = true
4240deps =
43- pre-commit>=3.2
41+ pre-commit>=3.2.1
42+ passenv =
43+ *
4444commands =
4545 pre-commit run --all-files --show-diff-on-failure
4646 python -c ' import pathlib; print("hint: run \{\} install to add checks as pre-commit hook".format(pathlib.Path(r"{envdir}") / "bin" / "pre-commit"))'
4747
4848[testenv:type]
4949description = run type check on code base
50- setenv =
51- {tty:MYPY_FORCE_COLOR = 1}
5250deps =
5351 mypy ==1.1.1
52+ setenv =
53+ {tty:MYPY_FORCE_COLOR = 1}
5454commands =
5555 mypy --strict src/filelock
5656 mypy --strict tests
5757
5858[testenv:coverage]
5959description = 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
6460skip_install = true
6561deps =
6662 covdefaults>=2.3
6763 coverage[toml]>=7.2.2
6864 diff-cover>=7.5
6965extras =
7066parallel_show_output = true
67+ passenv =
68+ DIFF_AGAINST
69+ setenv =
70+ COVERAGE_FILE = {toxworkdir}/.coverage
7171commands =
7272 coverage combine
7373 coverage report --skip-covered --show-missing
7474 coverage xml -o {toxworkdir}/coverage.xml
7575 coverage html -d {toxworkdir}/htmlcov
7676 diff-cover --compare-branch {env:DIFF_AGAINST:origin/main} {toxworkdir}/coverage.xml
7777depends =
78- py311
7978 py310
80- py39
81- py38
79+ py311
8280 py37
81+ py38
82+ py39
8383 pypy3
8484
8585[testenv:docs]
0 commit comments