Add support for tox to run tests against Django 1.X/2.0

This commit is contained in:
Swen Kooij 2018-01-29 13:34:40 +02:00
parent 6a4beca193
commit cd844fccec
4 changed files with 17 additions and 2 deletions

3
.gitignore vendored
View File

@ -19,3 +19,6 @@ dist/
# Ignore PyCharm
.idea/
# Ignore tox environments
.tox/

View File

@ -28,7 +28,7 @@ build:
-
command: flake8 ./localized_fields/
-
command: coverage run manage.py test
command: tox
coverage:
file: '.coverage'
format: 'py-cc'

View File

@ -1,6 +1,5 @@
-r base.txt
Django==1.11.9
django-autoslug==1.9.3
django-bleach==0.3.0
django-coverage-plugin==1.3.1
@ -14,3 +13,4 @@ django-coverage-plugin==1.3.1
flake8==3.5.0
pep8==1.7.1
dj-database-url==0.4.2
tox==2.9.1

12
tox.ini Normal file
View File

@ -0,0 +1,12 @@
[tox]
envlist = py35-dj{111,20}
[testenv]
deps =
dj111: Django>=1.11,<1.12
dj20: Django>=2.0,<2.1
-rrequirements/test.txt
setenv =
DJANGO_SETTINGS_MODULE=settings
passenv = DATABASE_URL
commands = coverage run manage.py test