-
Notifications
You must be signed in to change notification settings - Fork 21
/
tox.ini
74 lines (69 loc) · 1.75 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
[tox]
envlist = tests, docs, missing-migrations, isort, flake8, coverage, black, mypy
skipsdist = True
[testenv]
basepython = python3.11
allowlist_externals = poetry
commands_pre =
isort: poetry install --only formatting
flake8: poetry install --only flake8
black: poetry install --only formatting
mypy: poetry install --with prod --without formatting,flake8
commands =
isort: isort -c lego
flake8: flake8
black: black --check lego
mypy: mypy .
[testenv:tests]
allowlist_externals =
poetry
/usr/bin/make
setenv =
DJANGO_SETTINGS_MODULE=lego.settings
PYTHONPATH = {toxinidir}:{toxinidir}
LANG=C.UTF-8
COVERAGE_PROCESS_START={toxinidir}/.coveragerc
passenv =
STRIPE_TEST_KEY
DRONE
DATABASE
CACHE
commands_pre =
poetry install --without dev,mypy,formatting,flake8,docs
commands =
make lego/settings/local.py
coverage run --source=lego {toxinidir}/manage.py test {posargs}
[testenv:missing-migrations]
setenv =
DJANGO_SETTINGS_MODULE=lego.settings
PYTHONPATH = {toxinidir}:{toxinidir}
LANG=C.UTF-8
passenv =
STRIPE_TEST_KEY
DRONE
DATABASE
CACHE
commands_pre =
poetry install --without dev,coverage,mypy,formatting,flake8,docs
commands =
python manage.py migrate
python manage.py missing_migrations
[testenv:coverage]
basepython = python3.11
commands_pre =
poetry install --only coverage
commands =
coverage combine
coverage report --fail-under=75
coverage xml
[testenv:docs]
basepython =
python3.11
changedir =
docs
setenv =
PYTHONPATH = {toxinidir}:{toxinidir}/docs
commands_pre =
poetry install --without dev,coverage,mypy,formatting,flake8
commands=
sphinx-build -T -b html -d {envtmpdir}/_build/doctrees . {envtmpdir}/_build/html