Skip to content

Commit

Permalink
CI travis: enable linux
Browse files Browse the repository at this point in the history
  • Loading branch information
christianbrodbeck committed Feb 14, 2017
1 parent 351e187 commit 0f1e880
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 24 deletions.
40 changes: 22 additions & 18 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,38 +1,42 @@
os: osx
language: r
sudo: false
# https://github.com/travis-ci/travis-ci/issues/2312

cache: # https://docs.travis-ci.com/user/caching/
- packages
- pip

#python:
# - 2.7

r_packages:
- car
- ez
matrix:
include:
- os: osx # https://github.com/travis-ci/travis-ci/issues/2312
python: 2.7
sudo: false
env: CONDA_OS="MacOSX"
- os: linux
python: 2.7
sudo: false
env: CONDA_OS="Linux"
DISPLAY=:99.0

# Setup anaconda
# https://gist.github.com/dan-blanchard/7045057
before_install:
- wget -q http://repo.continuum.io/miniconda/Miniconda-latest-MacOSX-x86_64.sh -O miniconda.sh
- wget -q http://repo.continuum.io/miniconda/Miniconda-latest-$CONDA_OS-x86_64.sh -O miniconda.sh
- chmod +x miniconda.sh
- ./miniconda.sh -b -p $HOME/miniconda
- export PATH=$HOME/miniconda/bin:$PATH
- conda update --yes --quiet conda
- conda config --append channels conda-forge
- conda config --append channels christianbrodbeck
- conda config --append channels ncil # for r-ez
- conda install --yes --quiet --file requirements_install.txt
- conda install --yes --quiet --file requirements.txt
- conda install --yes --quiet nose
- pip install rpy2
- conda install --yes rpy2 r-car r-ez
- python -c "import mne; mne.datasets.testing.data_path()"
- python --version
- if [ "${TRAVIS_OS_NAME}" == "linux" ]; then
/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -screen 0 1400x900x24 -ac +extension GLX +render -noreset;
fi;

install:
- python setup.py develop

script:
- make test
- if [ "${TRAVIS_OS_NAME}" == "osx" ]; then
pythonw $(which nosetests) -v eelbrain eelbrain/_*;
else
nosetests -v eelbrain eelbrain/_*;
fi;
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ flake:
flake8 --count eelbrain examples scripts

test:
pythonw ${shell which nosetests} -v eelbrain eelbrain/_stats eelbrain/_trf eelbrain/_utils eelbrain/_wxgui eelbrain/_experiment eelbrain/load eelbrain/mne_fixes eelbrain/plot
nosetests -v eelbrain eelbrain/_stats eelbrain/_trf eelbrain/_utils eelbrain/_wxgui eelbrain/_experiment eelbrain/load eelbrain/mne_fixes eelbrain/plot

test-coverage:
rm -rf coverage .coverage
Expand Down
5 changes: 5 additions & 0 deletions eelbrain/_trf/tests/test_boosting.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,11 @@ def test_boosting():
yield run_boosting, ds, True
yield run_boosting, ds, False


def test_result():
"Test boosting results"
ds = datasets._get_continuous()

# convolve function
y = convolve([ds['h1'], ds['h2']], [ds['x1'], ds['x2']])
y.name = 'y'
Expand Down
5 changes: 2 additions & 3 deletions eelbrain/tests/test_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import os
import re
import shutil
import sys
from tempfile import mkdtemp

import mne
Expand Down Expand Up @@ -30,9 +31,7 @@ def run_example(example_path, name):
text = fid.read()

# check for explicit skip
if os.name == 'nt' and re.findall("^# skip on windows", text, re.MULTILINE):
return
elif re.findall("^# skip test", text, re.MULTILINE):
if re.findall("^# skip test", text, re.MULTILINE):
return

# check for required modules
Expand Down
3 changes: 1 addition & 2 deletions examples/statistics/pdf.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# skip on windows
# requires: tex
# skip test (requires LaTeX)
"""Performs ANOVA and creates a PDF of the ANOVA table.
Generating PDFs requires the ``tex`` Python module to be installed.
Expand Down

0 comments on commit 0f1e880

Please sign in to comment.