-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathtox.ini
129 lines (121 loc) · 3.21 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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
[tox]
# Django support for different python versions reference
# https://docs.djangoproject.com/en/dev/faq/install/#faq-python-version-support
envlist =
clean,
py27-django-{18,19,110,111},
py33-django-18,
py{34,35}-django-{18,19,110},
py{34,35,36}-django-{111,20},
py{35,36,37}-django-{master},
check, docs, spell, report
[travis]
python =
3.3: py33
3.4: py34
3.5: py35
3.6: py36
3.7: py37
2.7: py27
[travis:env]
DJANGO =
1.8 : django-18
1.9 : django-19
1.10 : django-110
1.11 : django-111
2.0 : django-20
2.1: django-21
master : django-master
[testenv]
# necessary to make cov find the .coverage file
# see http://blog.ionelmc.ro/2014/05/25/python-packaging/
usedevelop = true
passenv = DJANGO
setenv =
PYTHONPATH = {toxinidir}
COVERAGE_FILE = .tmp/.coverage.{envname}
commands =
# setup.py test may change django version to one required by other packages
coverage run --source src --parallel-mode setup.py test
# coverage run --source django_email_queue runtests.py
; pytest --cov=src --cov=tests --cov-append
; coverage report
; coverage xml
deps =
coverage
pytest==3.1.3 ; python_version < '3.4'
pytest ; python_version > '3.3'
pytest-cov
pytest-django
python-coveralls
django-18: Django>=1.8,<1.9
django-19: Django>=1.9,<1.10
django-110: Django>=1.10,<1.11
django-111: Django>=1.11,<1.12
django-20: Django>=2.0,<2.1
django-21: Django>=2.1,<2.2
django-master: -egit+https://github.com/django/django.git#egg=django
-r{toxinidir}/requirements/testing.txt
{toxinidir}/example_project
basepython =
py36-django-{111,20,21,master}: python3.6
py35-django-{18,19,110,111,20,21,master}: python3.5
py34-django-{18,19,110,111}: python3.4
py33-django-{18}: python3.3
py27-django-{18,19,110,111}: python2.7
# https://blog.ionelmc.ro/2014/05/25/python-packaging/#ci-templates-tox-ini
# https://hynek.me/articles/testing-packaging/
{docs,spell}: python3.5
{bootstrap,clean,check,report,extension-coveralls,coveralls,codecov}: python3.5
[testenv:spell]
setenv =
SPELLCHECK = 1
commands =
sphinx-build -b spelling docs dist/docs
extras = factories
skip_install = true
usedevelop = false
deps =
-rrequirements/base.txt
-rrequirements/development.txt
[testenv:docs]
extras = factories
deps =
-rrequirements/base.txt
-rrequirements/development.txt
commands =
sphinx-build {posargs: -E} -b html docs dist/docs
sphinx-build -b linkcheck docs dist/docs
[testenv:check]
deps =
docutils
check-manifest
flake8
readme-renderer
pygments
isort
skip_install = true
usedevelop = false
commands =
python setup.py check --strict --metadata --restructuredtext
check-manifest --ignore .idea,.idea/* {toxinidir}
flake8 src tests example_project setup.py
isort --verbose --check-only --diff --recursive src tests example_project setup.py
[testenv:report]
setenv =
COVERAGE_FILE = .tmp/.coverage
deps =
coverage
pytest
pytest-cov
skip_install = true
usedevelop = false
commands =
coverage combine --append
coverage report
coverage html
[testenv:clean]
commands = coverage erase
skip_install = true
usedevelop = false
deps = coverage