Skip to content

Commit

Permalink
Used TOX to start testing against Django 1.9.
Browse files Browse the repository at this point in the history
  • Loading branch information
charettes committed Apr 23, 2016
1 parent 7e67889 commit 4a55c88
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 21 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,4 @@ build/
dist/
django_colorful.egg-info
.coverage
.tox
43 changes: 23 additions & 20 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,34 @@
sudo: false
sudo: no

language: python

python:
- 2.7
- 3.2
- 3.3
- 3.4

env:
- REQUIREMENTS="django>=1.8,<1.9"
- REQUIREMENTS="https://github.com/django/django/archive/master.tar.gz"
- TOXENV=flake8
- TOXENV=py27-1.8
- TOXENV=py27-1.9
- TOXENV=py27-master
- TOXENV=py32-1.8
- TOXENV=py33-1.8
- TOXENV=py34-1.8
- TOXENV=py34-1.9
- TOXENV=py34-master

matrix:
exclude:
- python: 3.2
env: REQUIREMENTS="https://github.com/django/django/archive/master.tar.gz"
include:
- python: 3.5
env: TOXENV=py35-1.9
- python: 3.5
env: TOXENV=py35-master
allow_failures:
- env: REQUIREMENTS="https://github.com/django/django/archive/master.tar.gz"

cache: pip
- env: TOXENV=py27-master
- env: TOXENV=py34-master
- env: TOXENV=py35-master

install: pip install $REQUIREMENTS "coverage<4.0" mock flake8 coveralls
install:
- pip install tox coveralls "virtualenv<14.0"

script: python -R -Wonce `which coverage` run `which django-admin.py` test --pythonpath=`pwd` --settings=tests.settings -v2
script:
- tox

after_success:
- flake8
- coverage report -m
- coveralls
- if [ -f .coverage ]; then coveralls; fi
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
url=github_url,
author='Simon Charette',
author_email='[email protected]',
requires=[
install_requires=[
'Django>=1.8',
],
packages=find_packages(),
Expand Down
35 changes: 35 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
[tox]
args_are_paths = false
envlist =
flake8,
py27-{1.8,1.9,master},
py32-{1.8},
py33-{1.8},
py34-{1.8,1.9,master},
py35-{1.9,master}

[testenv]
basepython =
py27: python2.7
py32: python3.2
py33: python3.3
py34: python3.4
py35: python3.5
usedevelop = true
commands =
{envpython} -R -Wonce {envbindir}/coverage run {envbindir}/django-admin.py test -v2 --settings=tests.settings {posargs}
coverage report
deps =
py32: coverage<4.0
{py27,py32}: mock
{py27,py33,py34,py35}: coverage
1.8: Django>=1.8,<1.9
1.9: Django>=1.9,<1.10
master: https://github.com/django/django/archive/master.tar.gz

[testenv:flake8]
basepython = python2.7
commands =
flake8
deps =
flake8

0 comments on commit 4a55c88

Please sign in to comment.