forked from rapidpro/casepro
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
45 lines (36 loc) · 1.28 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
44
45
language: python
sudo: false
python:
- '2.7'
- '3.5'
- '3.6'
services:
- redis-server
addons:
postgresql: '9.3'
cache:
directories:
- $HOME/.cache/pip
install:
- pip install --upgrade pip
- pip install -r pip-freeze.txt --upgrade
- pip install coveralls
- npm install
before_script:
- psql -U postgres -c "CREATE USER casepro WITH PASSWORD 'nyaruka';"
- psql -U postgres -c "ALTER ROLE casepro WITH SUPERUSER;"
- psql -U casepro postgres -c "CREATE DATABASE casepro;"
- ln -s $TRAVIS_BUILD_DIR/casepro/settings.py.dev $TRAVIS_BUILD_DIR/casepro/settings.py
script:
- coverage run manage.py test --verbosity=2 --noinput
- 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=casepro.settings_travis | grep 'Error') || exit 1
- flake8
- node_modules/karma/bin/karma start karma.conf.coffee --single-run --browsers PhantomJS
after_success:
- pip install pyopenssl==17.4.0
- coveralls
notifications:
slack:
secure: EmQGwxkgzSU5y7dcT7B6TF4yIq/V9hBnSoysTv+D5nyQjSL99QVKK1psJ5gH0H7zvnHRTJ88Qip5G7SvbF0L1ReUEWwHGMYj8yd64mU75Vnx1SmXzvfzCejDyvS01QuYo22Ei15EYYfQWm5bz0soYMkgd1ySt1VoZ+0qd1ANNb8=