Travis and coveralls for private repo

By : Manjunath Hugar

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

Related Posts

Can we help you build amazing apps? Contact us today.

© Agiliq, 2009-2012