-
Notifications
You must be signed in to change notification settings - Fork 14
/
.travis.yml
74 lines (67 loc) · 2.6 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
67
68
69
70
71
72
73
74
sudo: false
matrix:
include:
- os: osx
language: generic
name: python3.7
- os: linux
language: python
name: python 2.7
python:
- 2.7
- os: linux
language: python
name: python 3.9
python:
- 3.9
before_install:
# osx deps
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew uninstall --ignore-dependencies python; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew unlink python@2; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install python3; export PATH="/usr/local/opt/python/libexec/bin:$PATH"; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew upgrade freetype; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew link --overwrite freetype; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install libpng; fi
install:
- python --version
- echo "pip:" $(which pip)
- pip install numpy "six>=1.13"
- echo "TRAVIS_OS_NAME:" "$TRAVIS_OS_NAME"
- echo "TRAVIS_PYTHON_VERSION:" "$TRAVIS_PYTHON_VERSION"
# - pip install nose
- git clone https://github.com/populse/soma-base.git /tmp/soma-base
- python /tmp/soma-base/setup.py install
#- pip install -U setuptools pip
- git clone --branch=2.0 https://github.com/populse/populse_db.git /tmp/populse_db
- pushd /tmp/populse_db
- PYTHONPATH="/tmp/populse_db/lib/python${TRAVIS_PYTHON_VERSION}/site-packages:$PYTHONPATH" python /tmp/populse_db/setup.py install
- popd
# until we release soma-workflow 3.1
- git clone https://github.com/neurospin/soma-workflow.git /tmp/soma-workflow
- pushd /tmp/soma-workflow
- python /tmp/soma-workflow/setup.py install
- popd
- pip install argparse
- if [ ${TRAVIS_PYTHON_VERSION:0:1} == "2" ]; then pip install importlib; fi
#- pip install nose-cov
- pip install codecov;
- if [[ $TRAVIS_OS_NAME == linux ]]; then pip install pre-commit; fi
# to test notebooks
- pip install jupyter nbconvert
- python -c 'import sys; sys.exit(0 if sys.version_info >= (2, 7) else 1)' && pip install nipype || echo "testing without nipype."
#- pip install soma-workflow
- python setup.py install
- export QT_API=pyqt5
# don't stay in source directory to actually use the installed capsul
- cd ..
script:
- coverage run -m capsul.test
# run code quality checks (skip them on Mac OS because Python 3 is not
# available there)
- if [[ $TRAVIS_OS_NAME == linux ]]; then pre-commit run --all-files; fi
after_success:
- codecov
cache:
directories:
- $HOME/.cache/pre-commit