-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
55 lines (49 loc) · 1.17 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
[tox]
envlist =
py312
test-coverage
lint
mypy
isolated_build = True
[testenv]
basepython = python3.12
skip_install = True
deps =
pytest
pytest-cov
pytest-randomly
; Install our application dependencies
-r requirements.txt
commands =
python -m pytest {posargs: --cov --cov-report=term-missing:skip-covered }
[testenv:test-coverage]
deps =
coverage
commands =
coverage report --skip-covered --show-missing --fail-under=100 --include="tests/*"
[testenv:lint]
deps =
pre-commit
commands =
pre-commit run --all-files
[testenv:mypy]
deps =
mypy
; Install our application dependencies
-r requirements.txt
commands =
mypy --show-error-codes {posargs: src}
; Update requirements.txt
[testenv:pip-compile]
deps =
pip-tools
allowlist_externals =
perl
setenv =
CUSTOM_COMPILE_COMMAND=tox -e pip-compile
commands =
pip-compile requirements.in {posargs: -o requirements.txt}
; Replace '-e file:///absolute/path' with '-e .' to workaround
; https://github.com/dependabot/feedback/issues/936
; and https://github.com/jazzband/pip-tools/issues/204
perl -pi -e 's,-e file:///.+,-e .,' requirements.txt