Skip to content

Instantly share code, notes, and snippets.

@niomwungeri-fabrice
Created October 29, 2019 16:07
Show Gist options
  • Save niomwungeri-fabrice/af1e58e4221755c89bbf19a256442249 to your computer and use it in GitHub Desktop.
Save niomwungeri-fabrice/af1e58e4221755c89bbf19a256442249 to your computer and use it in GitHub Desktop.
Configuration file for travisCI on Django projects
language: python
python:
- "3.6"
- "3.7"
notifications:
email: false
# command to install dependencies
install:
- pip install -r requirements.txt
- pip install coveralls
# command to run tests
services:
- postgresql
before_script:
- psql -c 'CREATE DATABASE questionnaire_test_db;' -U postgres
script:
- flake8
- coverage run manage.py test && coverage report
after_success:
- coveralls
@niomwungeri-fabrice
Copy link
Author

niomwungeri-fabrice commented Feb 4, 2020

Add the following line to travis CI env:

DATABASE_URL: postgres://localhost/questionnaire_test_db

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