-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.travis.yml
54 lines (53 loc) · 1.63 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
dist: xenial
sudo: required
notifications:
email: false
language: python
cache: pip
python:
- "3.5"
- "3.6"
- "3.7"
env:
- CATMAID_DIR=$TRAVIS_BUILD_DIR/travis/CATMAID CATMAID_BRANCH=master
- CATMAID_DIR=$TRAVIS_BUILD_DIR/travis/CATMAID CATMAID_BRANCH=dev
matrix:
fast_finish: true
allow_failures:
- env: CATMAID_DIR=$TRAVIS_BUILD_DIR/travis/CATMAID CATMAID_BRANCH=dev
services:
- postgresql
addons:
postgresql: 10 # will be replaced by v10, travis doesn't have it yet
before_install:
# setup CATMAID
- git clone -b $CATMAID_BRANCH https://github.com/catmaid/CATMAID.git $CATMAID_DIR
- cd $CATMAID_DIR
# CATMAID before_install
- mkdir tmp
- travis_retry sudo apt-get update -qq
- ./scripts/travis/install_postgres.sh
- ./scripts/travis/install_python.sh
- nvm install 11
# CATMAID install:
- ./scripts/travis/install_requirements.sh
- pip install coveralls flake8
- npm install
# CATMAID before_script:
# Set up and start postgres, create database, write config files
- ./scripts/travis/setup_database.sh
- ./scripts/travis/configure_catmaid.sh
install:
- export PATH=$(npm bin):$PATH
- pip install $TRAVIS_BUILD_DIR
- cd $CATMAID_DIR/django/projects
- python manage.py migrate --noinput
- python manage.py collectstatic --link --noinput
script:
- coverage run --source=circuitmap manage.py test circuitmap.tests
- cd $TRAVIS_BUILD_DIR
- if [ -x "$(command -v mypy)" ]; then mypy --config-file mypy.ini ./ || true; fi
- flake8 --config .travis.flake8 --exclude=$CATMAID_DIR .
- jshint --config .travis.jshintrc --exclude=$CATMAID_DIR .
after_success:
- cd django/projects && coveralls