Skip to content

Instantly share code, notes, and snippets.

@niteshpatel
Created September 18, 2016 01:48
Show Gist options
  • Save niteshpatel/ea5a33da65f6afdc5349f78ba1cf3add to your computer and use it in GitHub Desktop.
Save niteshpatel/ea5a33da65f6afdc5349f78ba1cf3add to your computer and use it in GitHub Desktop.
.travis.yml to build a Django project on Travis CI with Code Climate test coverage
# taken from https://github.com/niteshpatel/habitica-slack/
language: python
python:
- "2.7"
env:
- DJANGO=1.10.1
install:
- pip install -r requirements.txt
- pip install codeclimate-test-reporter
- pip install -q Django==$DJANGO
script:
- export DJANGO_SECRETKEY=secret # needed because settings.py pulls it from os.environ
- coverage run --source=habitica_slack manage.py test # create test coverage report
after_script:
- codeclimate-test-reporter --file .coverage # send test coverage report to code climate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment