-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtox.ini
48 lines (43 loc) · 1.04 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
[tox]
requires =
tox>=4
isolated_build = true
envlist = py{310,311}, pre-commit, mypy, build
[gh]
python =
3.10 = py310
3.11 = py311, pre-commit, mypy
[testenv]
description = run unit tests
package = wheel
allowlist_externals =
poetry
passenv = *
commands =
poetry install --only test --no-root
poetry run pytest --cov=pyoak --cov-branch --cov-report=xml --cov-report=term-missing tests
[testenv:pre-commit]
description = run pre-commit hooks (linters, formatters, etc.)
skip_install = true
allowlist_externals =
poetry
commands =
poetry install --only pre --no-root
poetry run pre-commit run --all-files
[testenv:mypy]
description = run mypy static type checker
skip_install = true
allowlist_externals =
poetry
commands =
poetry install --only "main, mypy" --no-root
poetry run mypy src tests
[testenv:build]
description = build package & test distribution
skip_install = true
allowlist_externals =
poetry
commands =
poetry install --only publish
poetry build
poetry run twine check dist/*