Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save mapes911/5789874 to your computer and use it in GitHub Desktop.
Save mapes911/5789874 to your computer and use it in GitHub Desktop.
integrating coveralls.io with circleci.com for a django project
Notes on how to get coveralls.io to work with your django project build on circleci.com
1. Add your repo to the coveralls.io site.
2. Add coveralls-python to your requirements.txt
eg.
coveralls==0.2
3. Add an override and a post directive to your circle.yml file
eg.
test:
override:
- coverage run --source=<comma separated list of your django apps> manage.py test
post:
- coveralls
4. Create a .coveragerc file at the root of your django project and add the following
to omit south migration files from your coverage report.
[report]
omit = *migrations*
5. Create a .coveralls.yml file and add your coveralls.io repo token
eg.
repo_token: YOUR_TOKEN
6. Profit!
@rwblair
Copy link

rwblair commented Oct 12, 2015

Nice write up. Instead of putting coveralls in requirements.txt to you can add the following section to circle.yml to get it installed:

dependencies:
  override:
    - pip install -r requirements.txt
    - pip install coveralls

This helps keep requirements.txt cleaner for non coveralls user.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment