forked from EtienneCmb/visbrain
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
86 lines (71 loc) · 2.38 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
75
76
77
78
79
80
81
82
83
84
85
86
language: python
sudo: false
dist: trusty
python:
- '3.6'
matrix:
include:
- env: TEST=standard
os: linux
- env: TEST=minimal
os: linux
- env: TEST=examples
os: linux
# - env: TEST=standard
# os: osx
# language: generic
allow_failures:
- env: TEST=minimal
before_install:
# See https://docs.travis-ci.com/user/gui-and-headless-browsers/#Using-xvfb-to-Run-Tests-That-Require-a-GUI :
- "/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1280x1024x16"
# Instal miniconda3 :
- if [ "${TRAVIS_OS_NAME}" == "linux" ]; then
wget http://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
else
wget http://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -O miniconda.sh;
fi;
- bash miniconda.sh -b -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"
- hash -r
- conda config --set always_yes yes --set changeps1 no
- conda update -q conda
- conda info -a
- SRC_DIR=$(pwd)
install:
# Create the py3 environnement ;
- conda create -q -n testenv python=$TRAVIS_PYTHON_VERSION numpy scipy pip
- source activate testenv
# Install dependencies :
- if [ "${TEST}" == "standard" ]; then
pip install codecov pytest pytest-cov pytest-sugar pytest-travis-fold;
pip install mne nibabel pandas;
fi;
- if [ "${TEST}" == "minimal" ]; then
pip install flake8 pep8-naming;
fi;
# - pip install PyOpenGL PyOpenGL_accelerate
# - pip install -q freetype-py husl pypng cassowary imageio
# ------------------- VISBRAIN -------------------
- cd ${SRC_DIR}
- pip install -e .
before_script:
# See https://docs.travis-ci.com/user/gui-and-headless-browsers/#Using-xvfb-to-Run-Tests-That-Require-a-GUI :
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- sleep 3 # give xvfb some time to start
script:
- if [[ "${TEST}" == "standard" ]]; then
make test;
elif [[ "${TEST}" == "minimal" ]]; then
make flake;
elif [[ "${TEST}" == "examples" ]]; then
make examples;
fi;
notifications:
email: false
slack: visbrainteam:lHdzZcFmXQczGlxJEDtQYqv9
after_success:
- if [ "${TEST}" == "standard" ]; then
codecov;
fi