Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Add Travis CI config file #32

Merged
merged 1 commit into from Mar 26, 2013

Conversation

Projects
None yet
2 participants
Member

treyhunner commented Mar 17, 2013

I've already confirmed that this file works on Travis CI by running it on my local repository: https://travis-ci.org/treyhunner/django-model-utils/builds/5559574

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.

Member

treyhunner commented Mar 20, 2013

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 runtests.py is one option.

Collaborator

carljm commented Mar 21, 2013

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.

Member

treyhunner commented Mar 21, 2013

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

carljm added a commit that referenced this pull request Mar 26, 2013

@carljm carljm merged commit 5003268 into jazzband:master Mar 26, 2013

Collaborator

carljm commented Mar 26, 2013

Thanks, merged!

Member

treyhunner commented Mar 28, 2013

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: https://travis-ci.org/treyhunner/django-model-utils/

Currently doesn't work: https://travis-ci.org/carljm/django-model-utils/

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

Collaborator

carljm commented Mar 28, 2013

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.

Member

treyhunner commented Mar 28, 2013

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