-
Notifications
You must be signed in to change notification settings - Fork 28
/
tox.ini
71 lines (66 loc) · 1.61 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
[tox]
envlist =
# Django official Python support
# Source: https://docs.djangoproject.com/en/5.0/faq/install/#what-python-version-can-i-use-with-django
{py38,py39,py310,py311,py312}-{drf314,drf315}-django42
{py310,py311,py312}-drf315-django50
[gh-actions]
python =
3.8: py38
3.9: py39
3.10: py310
3.11: py311
3.12: py312
[pytest]
DJANGO_SETTINGS_MODULE = test_settings
addopts = --cov drf_rw_serializers --cov-report term-missing --cov-report xml
norecursedirs = .* docs requirements
python_files=test_*.py
python_classes=*Tests
[testenv]
deps =
poetry
django42: Django>=4.2,<5.0
django50: Django>=5.0,<5.1
drf314: djangorestframework>=3.14,<3.15
drf315: djangorestframework>=3.15,<3.16
commands_pre =
poetry install --with dev,test -v
commands =
poetry run pytest {posargs}
allowlist_externals = touch
[testenv:docs]
setenv =
POETRY_VIRTUALENVS_CREATE=false
DJANGO_SETTINGS_MODULE = test_settings
PYTHONPATH = {toxinidir}
whitelist_externals =
make
rm
deps =
poetry
commands_pre =
poetry install --with docs -v
commands =
poetry run doc8 --ignore-path docs/_build README.rst docs
rm -f docs/drf_rw_serializers.rst
rm -f docs/modules.rst
make -C docs clean
make -C docs html
poetry run python setup.py check --restructuredtext --strict
[testenv:quality]
setenv =
POETRY_VIRTUALENVS_CREATE=false
PYTHONPATH = {toxinidir}
whitelist_externals =
make
rm
touch
deps =
poetry
commands_pre =
poetry install --with dev -v
commands =
touch tests/__init__.py
poetry run prospector
make selfcheck