forked from catmaid/CATMAID
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
47 lines (47 loc) · 2.04 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
notifications:
email: false
language: python
python:
- "2.7"
addons:
postgresql: 9.3
before_install:
- travis_retry sudo apt-get update -y -qq
install:
- travis_retry sudo apt-get install -y -qq $(< packagelist-ubuntu-12.04-apt.txt)
- travis_retry pip install -q pip==1.5.4
- travis_retry travis_wait pip install -q numpy==1.6.1 distribute==0.7.3
- travis_retry travis_wait 60 pip install -q -r django/pip-frozen
# Install additional dependencies for Travis
- pip install coveralls
- npm install jshint phantomjs qunit-phantomjs-runner
before_script:
- psql -c 'CREATE DATABASE catmaid;' -U postgres
- cd django
- cp configuration.py.example configuration.py
- sed -i -e "s?^\(abs_catmaid_path = \).*?\1'$(pwd)'?g" configuration.py
- sed -i -e "s?^\(abs_virtualenv_python_library_path = \).*?\1'$(echo $VIRTUAL_ENV)'?g" configuration.py
- sed -i -e "s?^\(catmaid_database_name = \).*?\1'catmaid'?g" configuration.py
- sed -i -e "s?^\(catmaid_database_username = \).*?\1'postgres'?g" configuration.py
- sed -i -e "s?^\(catmaid_timezone = \).*?\1'America/New_York'?g" configuration.py
- sed -i -e "s?^\(catmaid_servername = \).*?\1'localhost:8000'?g" configuration.py
- cat configuration.py
- python create_configuration.py
- sed -i -e "s?^\(ALLOWED_HOSTS = \).*?\1['*']?g" projects/mysite/settings.py
- cat projects/mysite/settings.py
- cd ..
script:
- jshint --config=.travis.jshintrc --exclude-path=.travis.jshintignore django/applications
- cd django/projects/mysite
- python manage.py syncdb --migrate --noinput
- python manage.py collectstatic --link --noinput
- coverage run --source=catmaid --omit='*management*,*migrations*,*tests*' manage.py test catmaid.tests
# Remove login requirement from QUnit test page
- sed -i 's/login_required(\([^)]*\))/\1/g' ../../applications/catmaid/urls.py
- python manage.py runserver &
- sleep 5
- cd ../../..
- phantomjs --version
- phantomjs node_modules/qunit-phantomjs-runner/runner.js "http://localhost:8000/tests"
after_success:
- cd django/projects/mysite && coveralls