forked from stephenmcd/django-forms-builder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
69 lines (64 loc) · 1.68 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
[tox]
minversion = 3.7.0
envlist =
clear-coverage
quality
translations
py{39,310}-django{32,42}
compute-coverage
skip_missing_interpreters = True
[testenv]
basepython = python3.9
depends =
clear-coverage
setenv =
PYTHONPATH = {toxinidir}/example
DJANGO_SETTINGS_MODULE = settings
skip_install =
coverage: True
deps =
coverage
django32: django==3.2.*
django42: django==4.2.*
commands =
coverage run --parallel-mode --source=forms_builder --branch -m django test {posargs}
[testenv:clear-coverage]
depends =
commands =
coverage erase
[testenv:compute-coverage]
depends =
py{39,310}-django{32,42}
commands =
coverage combine
coverage report --show-missing
[testenv:quality]
depends =
setenv =
PYTHONPATH = {toxinidir}:{toxinidir}/example
DJANGO_SETTINGS_MODULE = settings
extras = quality
# Do not fail on first error, but run all the checks
ignore_errors = True
commands =
isort --py 39 --recursive --check-only --diff --skip migrations forms_builder
flake8 --format=pylint --show-source forms_builder
pydocstyle forms_builder
mypy --package forms_builder
django-admin makemigrations --no-input --dry-run --check --verbosity 3
[testenv:translations]
depends = quality
setenv =
DJANGO_SETTINGS_MODULE =
whitelist_externals =
msgcmp
rm
# Do not fail on first error, but run all the checks
ignore_errors = True
extras = quality
changedir = {toxinidir}/forms_builder/forms
commands =
polint --show-msg locale/cs/LC_MESSAGES/django.po
django-admin makemessages --locale c --no-obsolete --no-location --keep-pot
msgcmp locale/cs/LC_MESSAGES/django.po locale/django.pot
rm -r locale/django.pot locale/c