Skip to content

Commit

Permalink
simplify travis setup
Browse files Browse the repository at this point in the history
  • Loading branch information
tyarkoni committed May 4, 2018
1 parent 44ff5b4 commit 8c5b97f
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 173 deletions.
3 changes: 3 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[run]
source = neurosynth
include = */neurosynth/*
47 changes: 9 additions & 38 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,40 +1,11 @@
# Adapted from nilearn
language: python

virtualenv:
system_site_packages: true

env:
global:
- TEST_RUN_FOLDER="/tmp" # folder where the tests are run from
- DEFAULT_TO_LATEST=true # use latest package versions if not explicitly set
matrix:
- DISTRIB="conda" PYTHON_VERSION="2.7"
# - DISTRIB="neurodebian" PYTHON_VERSION="2.7"
# # This is about as old as we want to support...
# - DISTRIB="conda" PYTHON_VERSION="2.7" NUMPY_VERSION="1.8.1"
# PANDAS_VERSION="0.14.0" SCIKIT_LEARN_VERSION="0.14.1"
# SCIPY_VERSION="0.13.3" MATPLOTLIB_VERSION="1.3.1"
- DISTRIB="conda" PYTHON_VERSION="3.4"

install:
- source ci/install.sh

before_script:
- find . -name "*.pyc" | xargs rm -f
- find . -name "*.so" | xargs rm -f
- find . -name "*.pyd" | xargs rm -f
- rm -rf build
- rm -f tags

script:
- python ci/show-python-package-versions.py
- (cd "$TEST_RUN_FOLDER" && nosetests -s neurosynth)

python:
- "3.6"
- "2.7"
install:
- pip install -r requirements.txt
- pip install python-coveralls coverage nose
script: nosetests --with-coverage --with-doctest
after_success:
# Ignore coveralls failures as the coveralls server is not very reliable
# but we don't want travis to report a failure in the github UI just
# because the coverage report failed to be published.
# coveralls need to be run from the git checkout
# so we need to copy the coverage results from TEST_RUN_FOLDER
- if [[ "$COVERAGE" == "true" ]]; then cp "$TEST_RUN_FOLDER/.coverage" .; coveralls || echo "failed"; fi
- coveralls --config_file .coveragerc
sudo: false
26 changes: 26 additions & 0 deletions .travis.yml.old
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# vim ft=yaml
# travis-ci.org and coveralls definition for NeuroSynth build
language: python
python:
- "2.7"
virtualenv:
system_site_packages: true
before_install:
- sudo apt-get update -qq
- sudo apt-get install lsb-release
- source /etc/lsb-release
- echo ${DISTRIB_CODENAME}
- wget -O- http://neuro.debian.net/lists/${DISTRIB_CODENAME}.us-nh.full | sudo tee /etc/apt/sources.list.d/neurodebian.sources.list
- sudo apt-key adv --recv-keys --keyserver pgp.mit.edu 2649A5A9
- sudo apt-get update -qq
- sudo apt-cache policy # What is actually available?
- sudo apt-get install -qq python-scipy python-nibabel
- sudo apt-get install -qq python-pandas
- sudo apt-get install -qq python-sklearn
- sudo apt-get install -qq python-ply
install:
- if [[ $TRAVIS_PYTHON_VERSION == 2.7 ]]; then pip install -q coveralls; fi
script:
- if [[ $TRAVIS_PYTHON_VERSION == 2.7 ]]; then coverage run --rcfile=.travis_coveragerc setup.py test; else python setup.py test; fi
after_success:
- if [[ $TRAVIS_PYTHON_VERSION == 2.7 ]]; then coveralls; fi
108 changes: 0 additions & 108 deletions ci/install.sh

This file was deleted.

27 changes: 0 additions & 27 deletions ci/show-python-package-versions.py

This file was deleted.

0 comments on commit 8c5b97f

Please sign in to comment.