-
Notifications
You must be signed in to change notification settings - Fork 3
/
.travis.yml
48 lines (39 loc) · 1.56 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
language: python
python:
- "2.7"
services:
- memcache
env:
global:
- "ARTIFACTS_S3_BUCKET=unicefuganda-mics"
- secure: cc1ZFVP0CWqu3VsvyOAXXy9QaQzxebnxP/91RlqbW5tZpBL1k4+toL0r/fa5MqNHn6vVdqsHmhnFfchkj2rsMlG0XV0EeRFwckoB+FKnQEg3eprjojxRTvWDHvSU936ihOuFvUydyp88ZYR9vsIvT4i52j7dHiwBbLg6itRMFME=
- secure: Mucag8v7sxqdpV4S0GSH27o+/dz31IL2PNa/sqSUFvcfw9XTmi2/7Ecxz1PgsldA4sJ+FySvOgVQzUf8Z9309v3LpLF/g6/BJIuNVT2yAvCgpvHoPeu5ItJoSlG010TTNhbAb7s78gZyZgBK3jA/0cTSOhA9QS4978wJ+iDc9eE=
# fix travis phantomjs to 1.9.1
before_install:
- wget http://phantomjs.googlecode.com/files/phantomjs-1.9.1-linux-x86_64.tar.bz2
- tar xjf phantomjs-1.9.1-linux-x86_64.tar.bz2
- sudo rm -rf /usr/local/phantomjs
- sudo mv phantomjs-1.9.1-linux-x86_64 /usr/local/phantomjs
# command to install dependencies
install:
- pip install -r pip-requires.txt
- pip install coveralls
- sudo rm -rf /dev/shm && sudo ln -s /run/shm /dev/shm
before_script:
- psql -c 'create database mics;' -U postgres
- cp mics/travis-settings.py mics/localsettings.py
- cp survey/investigator_configs.py.example survey/investigator_configs.py
- python manage.py syncdb --noinput
- python manage.py migrate
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
- gem install travis-artifacts
# command to run tests
script:
- coverage run manage.py test
- python manage.py harvest survey
after_success:
- coveralls
after_failure:
- tar -cvzf screenshots-$TRAVIS_BUILD_ID-$TRAVIS_JOB_ID.tar.gz screenshots
- travis-artifacts upload --path screenshots-$TRAVIS_BUILD_ID-$TRAVIS_JOB_ID.tar.gz