-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
59 lines (58 loc) · 1.81 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
51
52
53
54
55
56
57
58
59
dist: xenial
sudo: required
notifications:
email: false
language: python
cache: pip
python:
- "3.6"
env:
global:
- CATMAID_DIR=$TRAVIS_BUILD_DIR/travis/CATMAID
- PACKAGE_DIR=$TRAVIS_BUILD_DIR/autoproofreader
- JS_DIR=$PACKAGE_DIR/static/autoproofreader/js
matrix:
- CATMAID_BRANCH=master
- CATMAID_BRANCH=dev
matrix:
fast_finish: true
allow_failures:
- env: CATMAID_BRANCH=master
addons:
postgresql: 10
before_install:
- echo $CATMAID_DIR
- travis_retry sudo apt-get update -y -qq
# setup CATMAID
- git clone -b $CATMAID_BRANCH https://github.com/catmaid/CATMAID.git $CATMAID_DIR
- cd $CATMAID_DIR
- bash scripts/travis/install_postgres.sh
- bash scripts/travis/install_python.sh
- nvm install 11
install:
- cd $CATMAID_DIR
- bash scripts/travis/install_requirements.sh
- pip install coveralls flake8 pandas
- npm install
- npm install jshint jsdoc
- npm bin
- export PATH=$(npm bin):$PATH
# install extension
- pip install -e $TRAVIS_BUILD_DIR
before_script:
- cd $CATMAID_DIR
# This solves the issue of no file "/usr/share/postgresql/10/extension/postgis.control"
- sudo apt install postgresql-10-postgis-2.4-scripts # why does this work? its already in instal_postgres.sh
- bash scripts/travis/setup_database.sh
- bash scripts/travis/configure_catmaid.sh
- bash $TRAVIS_BUILD_DIR/scripts/travis/include_extension.sh
script:
- cd $CATMAID_DIR/django/projects
- python manage.py migrate --noinput
- python manage.py collectstatic --link --noinput
- coverage run --source=autoproofreader manage.py test autoproofreader.tests
- flake8 --config=$CATMAID_DIR/.travis.flake8 --statistics --count $PACKAGE_DIR
- jshint --config=$CATMAID_DIR/.travis.jshintrc --exclude-path=$CATMAID_DIR/.travis.jshintignore $JS_DIR
- jsdoc -r $JS_DIR
after_success:
- coveralls