forked from paddle-python/dj-paddle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
90 lines (79 loc) · 2.17 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
[tox]
envlist =
py35-django{21,22}-{postgres,postgres_native_json,mysql,sqlite}
py36-django{21,22,30}-{postgres,postgres_native_json,mysql,sqlite}
py37-django{21,22,30,master}-{postgres,postgres_native_json,mysql,sqlite}
py38-django{22,30,master}-{postgres,postgres_native_json,mysql,sqlite}
py37-django22-checkmigrations
lint
checkmigrations
makemigrations
makemessages
docs
[testenv]
passenv = DJPADDLE_*
setenv =
postgres: DJPADDLE_TEST_DB_VENDOR=postgres
mysql: DJPADDLE_TEST_DB_VENDOR=mysql
mysql: DJPADDLE_TEST_DB_HOST=127.0.0.1
mysql: DJPADDLE_TEST_DB_USER=root
sqlite: DJPADDLE_TEST_DB_VENDOR=sqlite
PYTHONWARNINGS = all
PYTEST_ADDOPTS = --cov --cov-fail-under=97 --cov-report=html --cov-report=term
commands = pytest {posargs}
deps =
postgres: psycopg2
mysql: mysqlclient
django21: Django>=2.1,<2.2
django21: jsonfield2<3.1
django22: Django>=2.2,<2.3
django30: Django>=3.0a1,<3.1
djangomaster: https://github.com/django/django/archive/master.tar.gz
pytest-django
pytest-cov
[testenv:lint]
skip_install = True
deps =
flake8
black
commands =
flake8 {toxinidir} {posargs}
black {toxinidir} --line-length=120 --exclude=djpaddle/migrations/ --check
[testenv:checkmigrations]
setenv = DJPADDLE_TEST_DB_VENDOR=sqlite
commands = ./manage.py makemigrations --check --dry-run
[testenv:makemigrations]
setenv = DJPADDLE_TEST_DB_VENDOR=sqlite
commands = ./manage.py makemigrations
[testenv:makemessages]
whitelist_externals = mkdir
changedir = {toxinidir}/djpaddle
commands =
- mkdir -p {toxinidir}/djpaddle/locale
- django-admin.py makemessages {posargs}
deps =
Django>=2.2,<2.3
[testenv:docs]
changedir = docs
whitelist_externals = make
commands = make html
deps =
django>=2.1
paddle-client>=1.0.0
sphinx
sphinx_rtd_theme
sphinx-autobuild
sphinxcontrib-django
[pytest]
DJANGO_SETTINGS_MODULE = tests.settings
[coverage:run]
branch = True
source = djpaddle
omit =
djpaddle/migrations/*
djpaddle/admin.py
[flake8]
max-complexity = 10
exclude = */migrations/*,.tox/,build/lib/,venv/,.venv/
ignore = W191, W503, E203
max-line-length = 120