forked from dj-stripe/dj-stripe
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
71 lines (59 loc) · 1.69 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]
isolated_build = True
envlist =
docs-django{32,40,main}-{postgres,mysql,sqlite}{,-nativejson}
pre-commit
py37-django{32}-{postgres,postgres-nativejson,mysql,sqlite}
py{38,39}-django{32,40,main}-{postgres,mysql,sqlite}{,-nativejson}
py310-django{32,40,main}-{postgres,mysql,sqlite}{,-nativejson}
skip_missing_interpreters = True
[gh-actions]
python =
3.7: py37
3.8: py38
3.9: py39, pre-commit
3.10: py310
[testenv]
passenv = DJSTRIPE_*
setenv =
postgres: DJSTRIPE_TEST_DB_VENDOR=postgres
mysql: DJSTRIPE_TEST_DB_VENDOR=mysql
sqlite: DJSTRIPE_TEST_DB_VENDOR=sqlite
nativejson: USE_NATIVE_JSONFIELD=1
PYTHONWARNINGS = all
PYTEST_ADDOPTS = --cov --cov-fail-under=90 --cov-report=html --cov-report=term --no-cov-on-fail
commands = pytest -x {posargs}
deps =
postgres: psycopg2>=2.9
mysql: mysqlclient>=1.4.0
django32: Django==3.2,<3.3
django40: Django==4.0,<4.1
djangomain: https://github.com/django/django/archive/main.tar.gz
pytest-django
pytest-cov
[testenv:pre-commit]
skip_install = True
deps = pre-commit
commands = pre-commit run --all-files --show-diff-on-failure
; Need to mention the env because we use tests.settings
[testenv:docs-django{32,40,main}-{postgres,mysql,sqlite}{,-nativejson}]
extras = docs
commands =
mkdocs build --clean
[pytest]
DJANGO_SETTINGS_MODULE = tests.settings
[coverage:run]
branch = True
source = djstripe
omit =
djstripe/migrations/*
djstripe/management/*
djstripe/admin.py
djstripe/checks.py
[coverage:html]
directory = cover
[flake8]
max-complexity = 10
exclude = djstripe/migrations/, .tox/, build/lib/, .venv/
ignore = W191, W503, E203, E501
max-line-length = 88