forked from catmaid/CATMAID
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
59 lines (59 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
48
49
50
51
52
53
54
55
56
57
58
59
dist: trusty
sudo: required
notifications:
email: false
language: python
cache: pip
python:
- "3.5"
- "3.6"
- "pypy3"
services:
- postgresql
addons:
chrome: stable
postgresql: 9.6
sauce_connect:
username: catmaid
jwt:
secure: "hj6rvwzab8ptfMKvRyqCZnWqun2uEv69nLCGxLXiDk9QZOUv/UG8PU060m6DTHtYE8iJw5E6qhTIhLKlpPadYptkxmiOXVGKlU6jam8SLKsSbHbdFsoziIPnU4mpqNgjvZ7Xb7xoTmYcd15G7Du3qgTHc28TeT5F9XnyfyDCH7M="
before_install:
- mkdir tmp
- travis_retry sudo apt-get update -y -qq
- bash scripts/travis/install_postgres.sh
- bash scripts/travis/install_python.sh
install:
# Install requirements for running CATMAID and its unit tests
- ./scripts/travis/install_requirements.sh
- pip install coveralls flake8
- npm install --only=dev
- npm bin
- export PATH=$(npm bin):$PATH
before_script:
# Set up and start postgres, create database, write config files
- ./scripts/travis/setup_database.sh
- ./scripts/travis/configure_catmaid.sh
script:
- flake8 --config=.travis.flake8 --statistics --count --exit-zero -q -q django
- jshint --config=.travis.jshintrc --exclude-path=.travis.jshintignore django/applications
- $TRAVIS_BUILD_DIR/node_modules/.bin/jsdoc -r django/applications/catmaid/static/js
- cd django/applications/catmaid/static/css
- $TRAVIS_BUILD_DIR/node_modules/.bin/csslint .
- cd $TRAVIS_BUILD_DIR
- cd django/projects
- python manage.py migrate --noinput
- python manage.py collectstatic --link --noinput
# Make sure there is no migration information missing. Makemigrations returns
# a non-zero exit code (1) when a new migration is created and otherwise zero.
- python manage.py makemigrations catmaid
# Run tests
- coverage run manage.py test catmaid.tests
# Remove login requirement from QUnit test page
- sed -i 's/login_required(\([^)]*\))/\1/g' ../applications/catmaid/urls.py
- python -Wall -Wignore::ImportWarning manage.py runserver &
- sleep 5
- cd ../..
# Run QUnit through karma in headless Chrome
- karma start karma.conf.js
after_success:
- cd django/projects && coveralls