Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Add Travis CI config file #32

merged 1 commit into from

2 participants

Trey Hunner Carl Meyer
Trey Hunner

I've already confirmed that this file works on Travis CI by running it on my local repository:

I also tried adding Python 3.3 tests with Django 1.5 in a separate branch but it is currently failing with Python 3 (as seen here). I also wasn't sure what the lowest supported Django version should be, but the tests seem to pass against Django 1.3.7 at least.

It's relatively easy to remove change this file to check against Django's git master branch as well.

This is the first .travis.yml file I've made. It was easier than I expected.

Trey Hunner

Travis CI supports MySQL and Postgres database access. I haven't tried using a real database for Travis tests yet, but it seems like running the tests against sqlite3, mysql, and postgres automatically might be a good idea.

I'm not sure yet what the most appropriate way to do that would be. Using dj-database-url in is one option.

Carl Meyer

Thanks for working on this! So tox.ini is what documents the supported versions of both Python and Django (and allows running tests locally against all these versions, just pip install tox and then run tox). I just noticed though that tox.ini hasn't yet been updated to account for the release of Django 1.5, which I need to do. Otherwise it's correct -- model-utils still supports back to Django 1.2 (though I wouldn't mind dropping 1.2 support pretty soon here.) In any case, I'd like for the Travis file to match tox.ini, including testing against Django trunk, since I will continue to use tox for running tests locally before commit/merge.

And no, model-utils doesn't yet support Python 3 - I'll open a ticket for that, it needs to happen soon.

Trey Hunner

I forgot that there was a tox.ini file to check for versions. The Travis configuration file has been updated to include Django 1.2 and Django trunk along with matching South/no-South tests present in the tox configuration.

Some differences:

  • Python 2.5 is tested by Travis but not by tox
  • code coverage is not evaluated in Travis
  • Django 1.5 isn't (yet) tested by tox
Carl Meyer carljm merged commit 5003268 into from
Carl Meyer

Thanks, merged!

Trey Hunner

It looks like you need to link Travis to your Github account and enable it for this repository for it to start working.

Currently works:

Currently doesn't work:

I think that's why pull request #33 isn't showing a build status.

Carl Meyer

Ok, I think I set this up. There seemed to be a build in progress for #33, but I was impatient so I just ran the tests locally and pushed it, thanks for that :-) Gonna put out a 1.3 release pretty soon here, unless you know of a reason to wait.

Trey Hunner

Great. I also noticed the build progress for #33.. the Travis builds seem to be taking a really long time today for some reason.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 21, 2013
  1. Trey Hunner
This page is out of date. Refresh to see the latest.
Showing with 28 additions and 0 deletions.
  1. +28 −0 .travis.yml
28 .travis.yml
@@ -0,0 +1,28 @@
+language: python
+ - "2.5"
+ - "2.6"
+ - "2.7"
+ - DJANGO=Django==1.2.7 SOUTH=1
+ - DJANGO=Django==1.3.7 SOUTH=1
+ - DJANGO=Django==1.4.5 SOUTH=1
+ - DJANGO=Django==1.4.5 SOUTH=1
+ - DJANGO=Django==1.5 SOUTH=1
+ - DJANGO=Django==1.4.5 SOUTH=0
+ - pip install $DJANGO --use-mirrors
+ - sh -c "if [ '$SOUTH' = '1' ]; then pip install South==0.7.6; fi"
+script: python
+ exclude:
+ - python: "2.5"
+ env: DJANGO=Django==1.5 SOUTH=1
+ - python: "2.5"
+ env: DJANGO= SOUTH=1
Something went wrong with that request. Please try again.