forked from python-wheel-build/fromager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
87 lines (78 loc) · 1.73 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
[tox]
minversion = 3.2.0
envlist=py,linter,mypy,coverage-report
[testenv]
extras = test
commands =
python -m coverage run -m pytest \
--log-level DEBUG \
-vv \
{posargs:tests}
[testenv:coverage-report]
description = Report coverage over all test runs.
basepython = py312
depends = py,py3{11,12},e2e
deps = coverage[toml]
skip_install = true
parallel_show_output = true
commands =
coverage combine
coverage report
[testenv:linter]
base_python=python3.11
deps=
ruff
packaging
PyYAML
commands =
ruff check src tests
ruff format --check src tests
python ./e2e/mergify_lint.py
skip_install = true
skip_sdist = true
[testenv:fix]
base_python=python3.11
deps=
ruff
commands =
ruff format src tests
ruff check --fix src tests
skip_install = true
skip_sdist = true
[testenv:cli]
base_python=python3.11
deps = .
commands =
fromager {posargs}
[testenv:e2e]
set_env =
COVERAGE_PROCESS_START={toxinidir}/pyproject.toml
commands_pre =
{envpython} -c 'import pathlib; pathlib.Path("{env_site_packages_dir}/cov.pth").write_text("import coverage; coverage.process_startup()")'
deps =
.
coverage[toml]
# empty commands
commands =
[testenv:mypy]
description = Python type checking with mypy
extras = mypy
commands =
mypy -p fromager
mypy tests/
[testenv:pkglint]
base_python=python3.11
deps=
.[build]
check-python-versions
commands=
python -m build
twine check dist/*.tar.gz dist/*.whl
check-python-versions --only pyproject.toml,.github/workflows/test.yml
[testenv:docs]
description = sphinx docs
basepython = python3.11
deps =
-r docs/requirements.txt
commands =
sphinx-build -M html docs docs/_build -j auto --keep-going {posargs:--fail-on-warning --fresh-env -n}