-
Notifications
You must be signed in to change notification settings - Fork 56
/
.travis.yml
66 lines (66 loc) · 2.13 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
60
61
62
63
64
65
66
dist: bionic
notifications:
email: false
language: python
cache: pip
python:
- "3.6"
- "3.7"
- "3.8"
- "nightly"
- "pypy3.6-7.3.1"
matrix:
allow_failures:
- python: "nightly"
services:
- postgresql
addons:
chrome: stable
# SAUCE_USERNAME and SAUCE_ACCESS_KEY are defined as part of the Travis
# project settings. GUI tests will be skipped if these are not defined.
sauce_connect: true
before_install:
- mkdir tmp
- travis_retry sudo apt-get update -y -qq
- sudo apt-get install -qq openssl
- bash scripts/travis/install_postgres.sh
- bash scripts/travis/install_python.sh
- bash scripts/travis/install_gdal.sh
- if python --version | grep PyPy; then curl https://sh.rustup.rs -sSf | sh -s -- -y; source $HOME/.cargo/env; fi
- bash scripts/travis/configure_pypy_libs.sh
- nvm install 11
install:
# Install requirements for running CATMAID and its unit tests
- ./scripts/travis/install_requirements.sh
- pip install coveralls
- npm install
before_script:
# Set up and start postgres, create database, write config files
- ./scripts/travis/setup_database.sh
- ./scripts/travis/configure_catmaid.sh
script:
- flake8 --statistics --count django
# see "scripts" in package.json
- npm run lint:js-diff
- npm run jsdoc
- cd $TRAVIS_BUILD_DIR
# Static type checking for Python when mypy is available (which it isn't in
# PyPy).
- if [ -x "$(command -v mypy)" ]; then mypy django/ ; fi
- 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
- travis_wait 45 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
- npm run karma
after_success:
- cd django/projects && coveralls