forked from onaio/onadata
-
Notifications
You must be signed in to change notification settings - Fork 3
/
.travis.yml
50 lines (50 loc) · 2.02 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
46
47
48
49
50
language: python
addons:
postgresql: 9.3
cache:
apt: true
directories:
- $HOME/.pip-cache/
services:
- mongodb
python:
- '2.7'
before_install:
- ./script/database/install_postgis onadata_test postgres 127.0.0.1
- ./script/install/ubuntu
# faster pandas install
# https://gist.github.com/dan-blanchard/7045057
- wget http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh
- chmod +x miniconda.sh
- ./miniconda.sh -b
- export PATH=/home/travis/miniconda/bin:$PATH
- conda update --yes conda
- conda create --yes -n condaenv python=2.7
- conda install --yes -n condaenv pip
- source activate condaenv
- sudo rm -rf /dev/shm
- sudo ln -s /run/shm /dev/shm
env:
- TESTFOLDER=onadata/apps/main
- TESTFOLDER="onadata/apps/api onadata/apps/logger onadata/apps/viewer onadata/apps/restservice onadata/apps/sms_support onadata/apps/stats onadata/libs"
install:
- conda install --yes python=$TRAVIS_PYTHON_VERSION numpy pandas=0.12.0
- pip install -r requirements/base.pip --allow-all-external
- pip install flake8
- python manage.py syncdb --noinput --settings=onadata.settings.travis_test
- python manage.py migrate --noinput --settings=onadata.settings.travis_test
# make ~/tmp dir writable for npm downloads
- mkdir -p "$HOME/tmp"
- if [[ "$TESTFOLDER" == onadata/apps/api* ]] ; then sudo chmod a+w $HOME/tmp ; fi
- if [[ "$TESTFOLDER" == onadata/apps/api* ]] ; then sudo npm install ; fi
- if [[ "$TESTFOLDER" == onadata/apps/api* ]] ; then bower install --force-latest ; fi
script:
- python manage.py test $TESTFOLDER --noinput --settings=onadata.settings.travis_test
- if [[ "$TESTFOLDER" == onadata/apps/api* ]] ; then karma start onadata/libs/javascript/tests/karma.conf.js ; fi
notifications:
email:
hipchat:
rooms:
secure: cfWcsNSVAq9vs0pFrT5VKrd7Be6uE8eDPuaOBVT+sGjRKoF7UgaY+jwHK6yaO+Iv+/4aBEsMb5Sc0qp0vQ7vwP9X9THO4Y+giFolQByKO74rnMEp/cn5Hdyv8r5UsHXLYj4MtipLAuD9wkZBOWjsbYfhhDZ6zJ7ZFztvYn/Fxoc=
irc: 'irc.freenode.org#onatest'