-
Notifications
You must be signed in to change notification settings - Fork 15
/
tox.ini
72 lines (65 loc) · 2.06 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
[tox]
envlist = coverage-clean,test-py310-psutil59-dateutil28-tzlocal2, test-py{310,311,312}-psutillatest-dateutillatest-tzlocal{4,latest}, integration-py{310,311,312}, mindeps, check, docs, coverage
[testenv]
extras = test
setenv =
COVERAGE_FILE = ./.coverage.{envname}
deps =
psutil59: psutil>=5.9,<5.10
psutillatest: psutil
dateutil28: python-dateutil>=2.8,<2.9
dateutillatest: python-dateutil
tzlocal2: tzlocal<3
tzlocal4: tzlocal>3,<5
tzlocallatest: tzlocal>4
commands =
{envbindir}/python -V
{envbindir}/python -c 'import psutil; print(psutil.__version__)'
{envbindir}/python -c 'import dateutil; print(dateutil.__version__)'
test: {envbindir}/pytest --cov -m "not integration" {posargs}
integration: {envbindir}/pytest --cov -m "integration" {posargs}
depends = coverage-clean
[testenv:coverage-clean]
deps = coverage
skip_install = true
commands = coverage erase
depends =
[testenv:coverage]
depends = test-py310-psutil{59,latest}-dateutil{28,latest}, test-py{310,311,312}-psutillatest-dateutillatest, integration-py{310,311,312}
deps =
coverage
skip_install = true
setenv =
commands =
- coverage combine
{envbindir}/coverage html
{envbindir}/coverage report
[testenv:mindeps]
description = tests whether the project can be used without any extras
extras =
deps =
depends =
commands =
{envbindir}/python -V
{envbindir}/python -c "import autosuspend; import autosuspend.checks.activity; import autosuspend.checks.wakeup"
{envbindir}/autosuspend -c tests/data/mindeps-test.conf daemon -r 1
[testenv:check]
depends =
deps =
-rrequirements-check.txt
commands =
{envbindir}/python -V
{envbindir}/ruff check src tests
{envbindir}/isort --check src tests
{envbindir}/black --check src tests
{envbindir}/mypy src tests
[testenv:docs]
basepython = python3.12
depends =
deps = -rrequirements-doc.txt
commands = {envbindir}/sphinx-build -W -b html -d {envtmpdir}/doctrees doc/source {envtmpdir}/html
[gh-actions]
python =
3.10: py310, coverage
3.11: py311, coverage
3.12: py312, coverage