Skip to content

Commit

Permalink
Use tox to run tests on Travis
Browse files Browse the repository at this point in the history
tox-travis helps make the configuration simple, running all of the tests
for a particular python version on the Travis matrix version of Python.

Add tests of Python 3.3, and drop Python 3.4 from testing with Django
1.6, since it does not support that version of Python.
  • Loading branch information
ryanhiebert committed May 22, 2015
1 parent e228d10 commit 57be081
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 11 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@
build
dist
README.rst
/.eggs/
/.tox/
15 changes: 4 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,8 @@
sudo: false
language: python
python:
- "2.7"
- "3.3"
- "3.4"
env:
- DJANGO="django==1.6.11" DJANGO_SETTINGS_MODULE="tests.settings"
- DJANGO="django==1.6.11" DJANGO_SETTINGS_MODULE="tests.swap_settings"
- DJANGO="django==1.7.7" DJANGO_SETTINGS_MODULE="tests.settings"
- DJANGO="django==1.7.7" DJANGO_SETTINGS_MODULE="tests.swap_settings"
- DJANGO="django==1.8" DJANGO_SETTINGS_MODULE="tests.settings"
- DJANGO="django==1.8" DJANGO_SETTINGS_MODULE="tests.swap_settings"
install:
- pip install $DJANGO
script:
- python setup.py test
install: pip install tox-travis
script: tox
19 changes: 19 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[tox]
envlist =
py{27,33}-django16-{noswap,swap},
py{27,33,34}-django{17,18}-{noswap,swap}

[tox:travis]
2.7 = py27-django{16,17,18}-{noswap,swap}
3.3 = py33-django{17,18}-{noswap,swap}
3.4 = py34-django{17,18}-{noswap,swap}

[testenv]
commands = python setup.py test
deps =
django16: django>=1.6
django17: django>=1.7
django18: django>=1.8
setenv =
noswap: DJANGO_SETTINGS_MODULE=tests.settings
swap: DJANGO_SETTINGS_MODULE=tests.swap_settings

0 comments on commit 57be081

Please sign in to comment.