Skip to content

visualspace/django-travis-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Django Travis Demo

image

Example of how to use Travis CI to automatically run tests for Django pluggable apps using django-setuptest.

Lazy people: GO HERE

If you've got an existing Django app with tests, you can cherry-pick from this repository in order to make them work with Travis CI. However, prepare to manually merge changes to setup.py in:

git fetch https://github.com/visualspace/django-travis-demo.git
git cherry-pick 0333f23014dbd5ada22d4cacc079331d889afa29
git cherry-pick 7e96de8e8cd60351c736ee884a5a3b748eb59547
git cherry-pick f31b9a1dc02a50a99947aea2ee3758235af03b96

After this, check and edit setup.py and test_settings.py, enable Travis for the package, push and you should see your tests being run.

General overview

The steps to replicate this work are (roughly) as follows:

  1. Create GIT repo: git init django-appname
  2. Create Django app and add to repo: django-admin.py startapp appname
  3. Add setup.py, see Building and Distributing Packages with Distribute
  4. Add django-setuptest to setup.py and add create test_settings.py. See 0333f2.
  5. Add .travis.yml file, see 7e96de.
  6. Add Travis build status image to README.
  7. Enable the app for testing with Travis on the Travis profile page.
  8. Push everything to GitHub.
  9. Watch your app's tests being run by Travis on several Python and Django versions.

Releases

No releases published

Packages

No packages published

Languages