forked from celery/django-celery-beat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
122 lines (109 loc) · 3.61 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
[tox]
envlist =
py35-django{22,30}
py36-django{22,30}
py37-django{22,30}
py38-django{22,30}
pypy3-django{22,30}
flake8
flakeplus
apicheck
linkcheck
pydocstyle
cov
[travis:env]
DJANGO =
2.2: django22
3.0: django30
[testenv]
deps=
-r{toxinidir}/requirements/default.txt
-r{toxinidir}/requirements/test.txt
-r{toxinidir}/requirements/test-ci.txt
cov: -r{toxinidir}/requirements/test-django.txt
django22: -r{toxinidir}/requirements/test-django22.txt
django30: -r{toxinidir}/requirements/test-django.txt
py{35,36,37,38,py3}: -r{toxinidir}/requirements/python3.txt
linkcheck,apicheck: -r{toxinidir}/requirements/docs.txt
flake8,flakeplus,pydocstyle: -r{toxinidir}/requirements/pkgutils.txt
sitepackages = False
recreate = False
commands =
pip list
py.test -xv
[testenv:upgradebeat130]
basepython = python3.6
setenv =
GIT_TAG = v1.3.0
whitelist_externals = *
commands =
# save current hash so we can come back to it
bash -c "git rev-parse HEAD > commit.hash"
# first install our starting version
git fetch --tags
git checkout {env:GIT_TAG}
# must use older versions for starting with older celery-beat
pip install "django>=1.11.17,<2.0"
pip install "django-timezone-field<4.0"
pip install "celery<5.0.0"
pip list
# run the migration for the older version
python manage.py migrate django_celery_beat
# now return to previous hash and ensure all migrations continue to work
bash -c "cat commit.hash | git checkout -"
pip install "django>=3.0,<4.0"
pip install "django-timezone-field>=4.0,<5.0"
# now make sure migrations still work backward and forward
python manage.py migrate django_celery_beat
python manage.py migrate django_celery_beat 0001
python manage.py migrate django_celery_beat
[testenv:upgradebeat140]
basepython = python3.6
whitelist_externals = *
setenv =
GIT_TAG = v1.4.0
commands =
# save current hash so we can come back to it
bash -c "git rev-parse HEAD > commit.hash"
# first install our starting version
git fetch --tags
git checkout {env:GIT_TAG}
# must use older versions for starting with older celery-beat
pip install "django>=1.11.17,<2.0"
pip install "django-timezone-field<4.0"
pip install "celery<5.0.0"
pip list
# run the migration for the older version
python manage.py migrate django_celery_beat
# now return to previous hash and ensure all migrations continue to work
bash -c "cat commit.hash | git checkout -"
pip install "django>=3.0,<4.0"
pip install "django-timezone-field>=4.0,<5.0"
# now make sure migrations still work backward and forward
python manage.py migrate django_celery_beat
python manage.py migrate django_celery_beat 0001
python manage.py migrate django_celery_beat
[testenv:apicheck]
basepython = python3.6
commands =
sphinx-build -W -b apicheck -d {envtmpdir}/doctrees docs docs/_build/apicheck
[testenv:linkcheck]
basepython = python3.6
commands =
sphinx-build -W -b linkcheck -d {envtmpdir}/doctrees docs docs/_build/linkcheck
[testenv:flake8]
basepython = python3.6
commands =
python -m flake8 {toxinidir}/django_celery_beat {toxinidir}/t
[testenv:pydocstyle]
basepython = python3.6
commands =
pydocstyle {toxinidir}/django_celery_beat
[testenv:cov]
basepython = python3.6
usedevelop = true
commands =
pip install -U https://github.com/celery/celery/zipball/master#egg=celery
pip install -U https://github.com/celery/kombu/zipball/master#egg=kombu
pip install Django==3.0
py.test -x --cov=django_celery_beat --cov-report=xml --no-cov-on-fail