-
Notifications
You must be signed in to change notification settings - Fork 100
/
tox.ini
92 lines (84 loc) · 2.05 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
88
89
90
91
[tox]
isolated_build = true
skip_missing_interpreters = true
parallel_show_output = true
envlist =
py{310,311,312}-django{42,50,51}
[testenv]
skip_install = true
commands =
pip install -e .[test]
pytest --cov-config .coveragerc --cov-report html --cov-report term --cov=swingtime tests
{posargs:pytest}
setenv =
DJANGO_SETTINGS_MODULE=demo.settings
PYTHONPATH={toxinidir}
PYTHONHASHSEED=0
deps =
django42: Django>=4.2,<5.0
django50: Django>=5.0,<5.1
django51: Django>=5.1,<5.2
coverage: Django>=4.2,<5.0
pep: Django>=4.2,<5.0
[testenv:clean]
description = Clean all build and test directories, as well as extraneous artificats
skipsdist = true
skip_install = true
deps =
whitelist_externals =
rm
find
commands =
find {toxinidir} -type f -name "*.pyc" -delete
find {toxinidir} -type d -name "__pycache__" -delete
rm -f {toxinidir}/demo/karate.db coverage
rm -rf \
{toxworkdir} {toxinidir}/.pytest_cache {toxinidir}/build \
{toxinidir}/django_swingtime.egg-info {toxinidir}/dist
[testenv:coverage]
description = Run code coverage against swingtime package
basepython = python3.11
whitelist_externals =
open
echo
commands =
pytest --cov-config .coveragerc --cov-report html --cov-report term --cov=swingtime
echo HTML coverage report: {toxinidir}/build/coverage/index.html
deps =
{[testenv]deps}
coverage>=5.4
pytest-cov>=2.11.1
[testenv:flake8]
description = Run flake8 against the swingtime/ package directory
skipsdist = true
skip_install = true
basepython = python3.11
deps = flake8
commands = flake8 swingtime
[testenv:dev]
description = Install development requirements
basepython = python3.11
skipsdist = true
usedevelop = True
commands =
deps =
ipython
ipdb
django-extensions
[testenv:docs]
description = Build the documentation
skipsdist = true
skip_install = true
changedir={toxinidir}/docs
whitelist_externals =
make
commands =
make html
deps =
sphinx
sphinx-rtd-theme
[gh-actions]
python =
3.10: py310
3.11: py311
3.12: py312