forked from mne-tools/mne-python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
72 lines (68 loc) · 3.02 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
language: python
env:
# Enable python 2 and python 3 builds
# DEPS=full: build optional dependencies: pandas, nitime, statsmodels,
# scikit-learn, patsy, nibabel; in the case of Python 2, also
# nitime
# DEPS=minimal: don't build optional dependencies; tests that require those
# dependencies are supposed to be skipped
- PYTHON=2.7 DEPS=full
- PYTHON=3.4 DEPS=full
- PYTHON=2.6 DEPS=full
- PYTHON=2.7 DEPS=minimal
# Setup anaconda
before_install:
- wget -q http://repo.continuum.io/miniconda/Miniconda-3.6.0-Linux-x86_64.sh -O miniconda.sh
- chmod +x miniconda.sh
- ./miniconda.sh -b &> /dev/null;
- export PATH=/home/travis/miniconda/bin:$PATH
- conda update --yes --quiet conda &> /dev/null;
install:
- conda create -n testenv --yes pip python=$PYTHON &> /dev/null
- source activate testenv &> /dev/null
- conda install --yes --quiet numpy scipy nose matplotlib > /dev/null
- if [ "${DEPS}" == "full" ]; then
conda install --yes --quiet pandas scikit-learn patsy pytables;
pip install -q nibabel joblib;
if [ ${PYTHON:0:1} == "2" ]; then
pip install -q nitime;
fi;
if [ "${PYTHON}" == "3.4" ]; then
conda install --yes --quiet ipython > /dev/null;
else
conda install --yes --quiet ipython==1.1.0 statsmodels > /dev/null;
fi;
fi;
- pip install -q coverage coveralls nose-timer > /dev/null
# Suppress the parallel outputs for logging cleanliness
- export MNE_LOGGING_LEVEL=warning
- export MNE_SKIP_SAMPLE_DATASET_TESTS=1
# Skip tests that require large downloads over the network to save bandwith
# usage as travis workers are stateless and therefore traditional local
# disk caching does not work.
- export MNE_SKIP_NETWORK_TESTS=1
- python setup.py build > /dev/null
- python setup.py install > /dev/null
- myscripts='browse_raw bti2fiff surf2bem'
- for script in $myscripts; do mne $script --help >/dev/null; done;
- SRC_DIR=$(pwd)
- cd ~
- MNE_DIR=$(python -c 'import mne;print(mne.__path__[0])')
- ln -s ${SRC_DIR}/mne/io/tests/data ${MNE_DIR}/io/tests/data
- ln -s ${SRC_DIR}/mne/io/bti/tests/data ${MNE_DIR}/io/bti/tests/data
- ln -s ${SRC_DIR}/mne/io/edf/tests/data ${MNE_DIR}/io/edf/tests/data
- ln -s ${SRC_DIR}/mne/io/kit/tests/data ${MNE_DIR}/io/kit/tests/data
- ln -s ${SRC_DIR}/mne/io/brainvision/tests/data ${MNE_DIR}/io/brainvision/tests/data
- ln -s ${SRC_DIR}/mne/io/egi/tests/data ${MNE_DIR}/io/egi/tests/data
- ln -s ${SRC_DIR}/setup.cfg ${MNE_DIR}/../setup.cfg
- ln -s ${SRC_DIR}/.coveragerc ${MNE_DIR}/../.coveragerc
# Link coverage to src dir, coveralls should be run from there (needs git calls)
- ln -s ${MNE_DIR}/../.coverage ${SRC_DIR}/.coverage
script:
- cd ${MNE_DIR}/../
- nosetests --with-timer --timer-top-n 30;
after_success:
# Need to run from source dir to exectue "git" commands
- echo "Running coveralls";
- cd ${SRC_DIR};
- coveralls;