-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtox.ini
64 lines (56 loc) · 2.32 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
; @TODO - when available, switch to pyproject.toml config instead
; @see - https://tox.wiki/en/latest/example/basic.html#pyproject-toml-tox-legacy-ini
[tox]
minversion = 4
envlist =
check
fast
report_all
skipsdist = true
skip_missing_interpreters = true
[testenv]
basepython = python3.10
deps =
-r{toxinidir}/requirements/test.txt
setenv =
DJANGO_SETTINGS_MODULE=folioblog.settings.test
passenv =
FOLIOBLOG_SECRET_KEY
FOLIOBLOG_POSTGRES_HOST
FOLIOBLOG_POSTGRES_PORT
commands =
check: black --check --diff {posargs:folioblog}
check: pylama {posargs:folioblog}
check: isort --check --diff {posargs:folioblog}
check: djhtml --check {posargs:folioblog}
all: python manage.py test --noinput {posargs:folioblog}
fast: python manage.py test --noinput --exclude-tag=slow --parallel=4 --failfast {posargs:folioblog}
warn: python -Wd manage.py test --noinput --exclude-tag=slow -v 2 {posargs:folioblog}
reverse: python manage.py test --reverse --noinput --exclude-tag=slow {posargs:folioblog}
shuffle: python manage.py test --noinput --exclude-tag=slow --shuffle --failfast {posargs:folioblog}
selenium: python manage.py test --noinput --tag=selenium {posargs:folioblog}
desk: python manage.py test --noinput --tag=selenium --exclude-tag=mobile {posargs:folioblog}
mobile: python manage.py test --noinput --tag=mobile {posargs:folioblog}
units: coverage erase
units: coverage run --omit='manage.py,*/wsgi.py,*/compressor.py,*/selenium/*,*/settings/*' manage.py test --noinput --failfast --exclude-tag=slow folioblog
units: coverage xml -o units.xml
report: coverage erase
report: coverage run --omit='manage.py,*/wsgi.py,*/compressor.py,*/selenium/*,*/settings/*' manage.py test --noinput --failfast --exclude-tag=slow folioblog
report: coverage html --precision=2
report: coverage report --precision=2 --fail-under=100
report_all: coverage erase
report_all: coverage run manage.py test --noinput --failfast folioblog
report_all: coverage html --precision=2
report_all: coverage xml -o coverage.xml
report_all: coverage report --precision=2 --fail-under=100
[testenv:check]
deps =
black
djhtml
isort
pylama[toml]
[testenv:poetry]
deps = pre-commit
commands =
pre-commit run -a poetry-lock
pre-commit run -a poetry-export