From 2845f2f7fd73c0f77dbe163a7d8459385241d72f Mon Sep 17 00:00:00 2001 From: rasbt Date: Wed, 13 Apr 2016 20:11:18 -0400 Subject: [PATCH] basic ci --- .travis.yml | 15 ++++++--------- ci/.travis_install.sh | 31 +++++++++++-------------------- ci/.travis_test.sh | 9 ++------- 3 files changed, 19 insertions(+), 36 deletions(-) diff --git a/.travis.yml b/.travis.yml index c61847c..69e1321 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,17 +3,14 @@ virtualenv: system_site_packages: true env: matrix: - - PYTHON_VERSION="2.7" LATEST="true" - - PYTHON_VERSION="3.4" LATEST="true" - - PYTHON_VERSION="3.5" LATEST="true" - - PYTHON_VERSION="3.5" COVERAGE="true" LATEST="true" + - PYTHON_VERSION="2.7" FROM="setup.py" + - PYTHON_VERSION="3.5" FROM="setup.py" + - PYTHON_VERSION="2.7" FROM="github" + - PYTHON_VERSION="3.5" FROM="github" + - PYTHON_VERSION="2.7" FROM="pypi" + - PYTHON_VERSION="3.5" FROM="pypi" install: source ./ci/.travis_install.sh script: bash ./ci/.travis_test.sh -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. - - if [[ "$COVERAGE" == "true" ]]; then coveralls || echo "failed"; fi cache: apt sudo: false notifications: diff --git a/ci/.travis_install.sh b/ci/.travis_install.sh index 9d79d9b..6e8f1a7 100755 --- a/ci/.travis_install.sh +++ b/ci/.travis_install.sh @@ -4,10 +4,6 @@ # The behavior of the script is controlled by environment variabled defined # in the .travis.yml in the top level folder of the project. -# License: 3-clause BSD - -set -e - # Deactivate the travis-provided virtual environment and setup a # conda-based environment instead @@ -21,23 +17,18 @@ chmod +x miniconda.sh && ./miniconda.sh -b export PATH=/home/travis/miniconda/bin:$PATH conda update --yes conda -# Configure the conda environment and put it in the path using the -# provided versions -if [[ "$LATEST" == "true" ]]; then - conda create -n testenv --yes python=$PYTHON_VERSION pip nose psutil -else - conda create -n testenv --yes python=$PYTHON_VERSION pip nose \ - psutil=$PSUTIL_VERSION -fi +conda create -n testenv --yes python=$PYTHON_VERSION pip nose source activate testenv -if [[ "$COVERAGE" == "true" ]]; then - pip install coverage coveralls -fi +pip install psutil -# Build pyprind in the install.sh script to collapse the verbose -# build output in the travis output when it succeeds. -python --version -python -c "import psutil; print('psutil%s' % psutil.__version__)" -python setup.py build_ext --inplace +if [[ "$FROM" == "github" ]]; then + pip install git+git://github.com/rasbt/pyprind.git#egg=pyprind + +elif [[ "$FROM" == "pypi" ]]; then + pip install pyprind + +else + python setup.py install +fi diff --git a/ci/.travis_test.sh b/ci/.travis_test.sh index e58bd2b..8eca37b 100755 --- a/ci/.travis_test.sh +++ b/ci/.travis_test.sh @@ -9,11 +9,6 @@ set -e python --version +python -c "import pyprind; print('pyprind %s' % pyprind.__version__)" -if [[ "$COVERAGE" == "true" ]]; then - nosetests -s -v --with-coverage --cover-package=pyprind - -else - nosetests -s -v pyprind -fi -#make test-doc test-sphinxext +nosetests -s -v