Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Travis CI config file #32

Merged
merged 1 commit into from
Mar 26, 2013
Merged

Add Travis CI config file #32

merged 1 commit into from
Mar 26, 2013

Conversation

treyhunner
Copy link
Member

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.

@treyhunner
Copy link
Member Author

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.

@carljm
Copy link
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.

@treyhunner
Copy link
Member Author

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
@carljm
Copy link
Collaborator

carljm commented Mar 26, 2013

Thanks, merged!

@treyhunner
Copy link
Member Author

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.

@carljm
Copy link
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.

@treyhunner
Copy link
Member Author

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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants