use tox generative envlist with factor dependencies

This commit is contained in:
Sławek Ehlert 2014-10-30 22:30:38 +01:00
parent 7af6d9e7c5
commit 55a2cf6a36
3 changed files with 38 additions and 167 deletions

1
.gitignore vendored
View file

@ -6,3 +6,4 @@ test.db
build/
.tox/
htmlcov/
*.pyc

View file

@ -1,27 +1,27 @@
language: python
env:
- TOXENV=py26-1.4.x
- TOXENV=py26-1.5.x
- TOXENV=py26-1.6.x
- TOXENV=py27-1.4.x
- TOXENV=py27-1.5.x
- TOXENV=py27-1.6.x
- TOXENV=py27-1.7.x
- TOXENV=py32-1.5.x
- TOXENV=py32-1.6.x
- TOXENV=py32-1.7.x
- TOXENV=py33-1.5.x
- TOXENV=py33-1.6.x
- TOXENV=py33-1.7.x
- TOXENV=py34-1.5.x
- TOXENV=py34-1.6.x
- TOXENV=py34-1.7.x
- TOXENV=pypy-1.4.x
- TOXENV=pypy-1.5.x
- TOXENV=pypy-1.6.x
- TOXENV=pypy-1.7.x
- TOXENV=flake827
- TOXENV=flake833
- TOXENV=py26-dj14
- TOXENV=py26-dj15
- TOXENV=py26-dj16
- TOXENV=py27-dj14
- TOXENV=py27-dj15
- TOXENV=py27-dj16
- TOXENV=py27-dj17
- TOXENV=py32-dj15
- TOXENV=py32-dj16
- TOXENV=py32-dj17
- TOXENV=py33-dj15
- TOXENV=py33-dj16
- TOXENV=py33-dj17
- TOXENV=py34-dj15
- TOXENV=py34-dj16
- TOXENV=py34-dj17
- TOXENV=pypy-dj14
- TOXENV=pypy-dj15
- TOXENV=pypy-dj16
- TOXENV=pypy-dj17
- TOXENV=flake8-py27
- TOXENV=flake8-py33
install:
- pip install tox
script:

160
tox.ini
View file

@ -1,9 +1,11 @@
[testenv]
[tox]
skipsdist = True
usedevelop = True
minversion=1.8
envlist = coverage-py27-dj16, flake8-py27, flake8-py33, py{26,27,32,33,34,py}-dj{14,15,16,17,18}
[testenv]
deps =
flake8
coverage
django-discover-runner
mock
dj-database-url
@ -11,156 +13,24 @@ deps =
dj-search-url
django-cache-url>=0.6.0
six
deps14 =
https://github.com/django/django/archive/stable/1.4.x.zip#egg=django
deps15 =
https://github.com/django/django/archive/stable/1.5.x.zip#egg=django
deps16 =
https://github.com/django/django/archive/stable/1.6.x.zip#egg=django
deps17 =
https://github.com/django/django/archive/master.zip#egg=django
dj14: https://github.com/django/django/archive/stable/1.4.x.zip#egg=django
dj15: https://github.com/django/django/archive/stable/1.5.x.zip#egg=django
dj16: https://github.com/django/django/archive/stable/1.6.x.zip#egg=django
dj17: https://github.com/django/django/archive/stable/1.7.x.zip#egg=django
dj18: https://github.com/django/django/archive/master.zip#egg=django
flake8: flake8
coverage: coverage
commands =
python manage.py test -v2 {posargs:tests} --failfast
[testenv:flake827]
basepython = python2.7
deps = flake8
[testenv:flake8-py27]
commands = flake8 configurations --ignore=E501,E127,E128,E124
[testenv:flake833]
basepython = python3.3
deps = flake8
[testenv:flake8-py33]
commands = flake8 configurations --ignore=E501,E127,E128,E124
[testenv:py26-1.4.x]
basepython = python2.6
deps =
{[testenv]deps}
{[testenv]deps14}
[testenv:py26-1.5.x]
basepython = python2.6
deps =
{[testenv]deps}
{[testenv]deps15}
[testenv:py26-1.6.x]
basepython = python2.6
deps =
{[testenv]deps}
{[testenv]deps16}
[testenv:py27-1.4.x]
basepython = python2.7
deps =
{[testenv]deps}
{[testenv]deps14}
[testenv:py27-1.5.x]
basepython = python2.7
deps =
{[testenv]deps}
{[testenv]deps15}
[testenv:py27-1.6.x]
basepython = python2.7
deps =
{[testenv]deps}
{[testenv]deps16}
[testenv:py27-1.7.x]
basepython = python2.7
deps =
{[testenv]deps}
{[testenv]deps17}
[testenv:py32-1.5.x]
basepython = python3.2
deps =
{[testenv]deps}
{[testenv]deps15}
[testenv:py32-1.6.x]
basepython = python3.2
deps =
{[testenv]deps}
{[testenv]deps16}
[testenv:py32-1.7.x]
basepython = python3.2
deps =
{[testenv]deps}
{[testenv]deps17}
[testenv:py33-1.5.x]
basepython = python3.3
deps =
{[testenv]deps}
{[testenv]deps15}
[testenv:py33-1.6.x]
basepython = python3.3
deps =
{[testenv]deps}
{[testenv]deps16}
[testenv:py33-1.7.x]
basepython = python3.3
deps =
{[testenv]deps}
{[testenv]deps17}
[testenv:py34-1.5.x]
basepython = python3.4
deps =
{[testenv]deps}
{[testenv]deps15}
[testenv:py34-1.6.x]
basepython = python3.4
deps =
{[testenv]deps}
{[testenv]deps16}
[testenv:py34-1.7.x]
basepython = python3.4
deps =
{[testenv]deps}
{[testenv]deps17}
[testenv:pypy-1.4.x]
basepython = pypy
deps =
{[testenv]deps}
{[testenv]deps14}
[testenv:pypy-1.5.x]
basepython = pypy
deps =
{[testenv]deps}
{[testenv]deps15}
[testenv:pypy-1.6.x]
basepython = pypy
deps =
{[testenv]deps}
{[testenv]deps16}
[testenv:pypy-1.7.x]
basepython = pypy
deps =
{[testenv]deps}
{[testenv]deps17}
[testenv:coverage-py27-1.6.x]
basepython = python2.7
deps =
{[testenv]deps}
{[testenv]deps16}
[testenv:coverage-py27-dj16]
commands = coverage erase
coverage run --source=. manage.py test -v2 {posargs:tests}
coverage report -m configurations/*py