forked from mne-tools/mne-python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
67 lines (63 loc) · 2.68 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
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.3 DEPS=full
- PYTHON=2.6 DEPS=full
- PYTHON=2.7 DEPS=minimal
# Setup anaconda
before_install:
- wget http://repo.continuum.io/miniconda/Miniconda-2.2.2-Linux-x86_64.sh -O miniconda.sh
- chmod +x miniconda.sh
- ./miniconda.sh -b
- export PATH=/home/travis/anaconda/bin:$PATH
- conda update --yes conda
# The next couple lines fix a crash with multiprocessing on Travis and are not specific to using Miniconda
- sudo rm -rf /dev/shm
- sudo ln -s /run/shm /dev/shm
install:
- conda create -n testenv --yes pip python=$PYTHON
- source activate testenv
- conda install --yes ipython==1.1.0 numpy scipy nose matplotlib
- if [ "${DEPS}" == "full" ]; then
conda install --yes pandas statsmodels scikit-learn patsy;
pip install nibabel;
if [ ${PYTHON:0:1} == "2" ]; then
pip install nitime;
fi;
fi;
- pip install coverage; pip install coveralls; pip install nose-timer
- MNE_FORCE_SERIAL=1
- MNE_SKIP_SAMPLE_DATASET_TESTS=1
- python setup.py build
- python setup.py install
- 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:
# Suppress the parallel outputs for logging cleanliness
- export MNE_LOGGING_LEVEL=warning
- 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;