forked from rapidpro/rapidpro
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
43 lines (42 loc) · 1.72 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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
language: python
python:
- '2.7.11'
services:
- redis-server
addons:
postgresql: '9.4'
sudo: false
cache:
directories:
- $HOME/.cache/pip
matrix:
fast_finish: true
install:
- pip install --upgrade pip
- pip --version
- pip install -r pip-freeze.txt --upgrade
- pip install setuptools==33.1.1 # Recent version breaks packaging.requirements, this is a temp fix: https://github.com/pypa/setuptools/issues/942
- pip install coveralls
- npm install
before_script:
- psql -U postgres -c "CREATE USER temba WITH PASSWORD 'temba';"
- psql -U postgres -c "ALTER ROLE temba WITH SUPERUSER;"
- psql -d 'template1' -U postgres -c "CREATE EXTENSION postgis;"
- psql -d 'template1' -U postgres -c "CREATE EXTENSION postgis_topology;"
- psql -d 'template1' -U postgres -c "CREATE EXTENSION hstore;"
- psql -U temba postgres -c "CREATE DATABASE temba;"
- ln -s $TRAVIS_BUILD_DIR/temba/settings.py.dev $TRAVIS_BUILD_DIR/temba/settings.py
script:
- flake8
- python manage.py makemigrations --dry-run | grep 'No changes detected' || (echo 'There are changes which require migrations.' && exit 1)
- python manage.py collectstatic --noinput
- (! python manage.py compress --extension=".haml" --settings=temba.settings_travis | grep 'Error') || exit 1
- node_modules/karma/bin/karma start karma.conf.coffee --single-run --browsers PhantomJS
- coverage run manage.py test --noinput --verbosity=2
after_success:
- coveralls --rcfile .coveragerc_failcheck
- coverage report -i --rcfile .coveragerc
- coverage report -i --rcfile .coveragerc_failcheck --fail-under=100
notifications:
slack:
secure: b2/RUpO6gWEDgOI/sEWsjt2cVnwp3hOWUSMnHpVuY0pZBzzrICZ5MeqEulwCoKy+8ohaCmYUL42RzJwq1v2FITo5YDeiLrqmrkYR0Zieel/Vey+o6sBdR6y2yPvWjBmydHNvfUyMshT5iqEn4bS6bjhm57F0rLJX7mTqp19A+68=