Travis and coveralls for private repo

Before we begin, i recommend you to read this first Continous integration with travis and for Django apps.

Here is how .travis.yml example file looks like:

language: python
  - 2.7
  - pip install -r requirements.txt
  - pip install coveralls
  coverage run test

Setting up coveralls for private repositories requires you to add just one more file .coveralls.yml.

1) Create a .coveralls.yml and make sure it resides in your project’s root directory.

2) Add the following to this file:

service_name: travis-pro
repo_token: ****

service_name is to specify where Coveralls should look to find additional information about your builds.

You can get the repo_token from your repository’s page on Coveralls, if you have the admin privileges. This is to tell which project on Coveralls your project maps to.

Make sure your repo_token remains secret and do not add this to your public repository.

3) Add the file, commit it and make a git push.

4) If everything is OK you should see some thing like the below in your travis build:

Submitting coverage to
Coverage submitted!
Job #22.1

Thats it now get a coverage badge from coveralls and add this badge in your repo’s

Thank you for reading the Agiliq blog. This article was written by Manjunath Hugar on Aug 22, 2014 in .

You can subscribe ⚛ to our blog.

We love building amazing apps for web and mobile for our clients. If you are looking for development help, contact us today ✉.

Would you like to download 10+ free Django and Python books? Get them here