forked from eHealthAfrica/nutsurv
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
26 lines (23 loc) · 1.06 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
language: python
addons:
postgresql: "9.4"
install:
- pip install flake8
- npm config set spin=false
- npm install -g bower
- sudo apt-get update && sudo apt-get install -y python-numpy python-scipy python-psycopg2 postgresql-9.3-postgis-2.1
script:
- virtualenv --system-site-packages nutsurv-venv
- source nutsurv-venv/bin/activate
- pip install -r requirements/development.txt
- flake8 --exclude migrations --ignore E501,C901 ./nutsurv
- '! grep -C3 "field=jsonfield.fields.JSONField(help_text" -- */*/migrations/* || echo -e "\nMigrations for jsonfield.fields.JSONField are discouraged\n"'
- psql -f enable_postgis.sql -U postgres
- psql -f make_nutsurv_dev.sql -U postgres
- bower install
- cd nutsurv
- sed -iorig s/postgres/nutsurv_dev/ nutsurv/settings.py
- echo 'POSTGIS_VERSION = (2, 1)' >> configuration.py
- ln -s /usr/lib/python2.7/dist-packages/psycopg2 ~/virtualenv/python2.7/lib/python2.7/site-packages
- ln -s /usr/lib/python2.7/dist-packages/scipy ~/virtualenv/python2.7/lib/python2.7/site-packages
- py.test ./*/tests/*.py