Skip to content
This repository has been archived by the owner on Nov 10, 2022. It is now read-only.

Commit

Permalink
Add Travis CI (#1)
Browse files Browse the repository at this point in the history
* Add Travis CI

* Use requirements.txt, fix both error

Use requirements.txt instead of common-requirements.txt
Fix error by setting boto config to /dev/null per
travis-ci/travis-ci#7940

* Set postgres version on Travis

By default Travis uses Postgres 9.2, which doesn't support the JSONB
type that we need.
  • Loading branch information
nickcatal committed Oct 31, 2018
1 parent 0c43b5d commit 70ae997
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .travis.yml
@@ -0,0 +1,34 @@
language: python
# Test against 2.7
python:
- "2.7"
cache:
directories:
- $HOME/.cache/pip
addons:
postgresql: "9.4"
services:
- postgresql
env:
PIP_DOWNLOAD_CACHE=$HOME/.cache/pip
DATABASE_URL=pgsql://postgres:@localhost:5432/everyvoter
CACHE_URL=dummycache://
SECRET_KEY=demo_secret_key
GEOCODIO_KEY=DEMO
CELERY_ALWAYS_EAGER=True
before_install:
- pip install --upgrade pip
install:
- pip install -r requirements.txt
# command to run tests
script:
# Fix for boto error on Travis
- export BOTO_CONFIG=/dev/null
- python manage.py test
# install and run pylint if everything passed
after_success:
- pip install pylint==1.5.2
- pylint --rcfile=.pylintrc accounts everyvoter_common election branding api user_import rendering geodataset hirefire staff
# turn off email notifications
notifications:
email: false

0 comments on commit 70ae997

Please sign in to comment.