Skip to content

Commit

Permalink
Merge pull request #308 from jGaboardi/update_travis
Browse files Browse the repository at this point in the history
Update travis CI for new testing schema
  • Loading branch information
jGaboardi committed Sep 1, 2019
2 parents 24df012 + ef5e060 commit c577c8c
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 39 deletions.
99 changes: 61 additions & 38 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,44 +1,63 @@
dist: xenial
language: python
sudo: true
branches:
only:
- master

python:
- 3.6
- 3.7

env:
- PYSAL_PYPI=true PYSAL_PLUS=true
- PYSAL_PYPI=true PYSAL_PLUS=false
- PYSAL_PYPI=false PYSAL_PLUS=true
- PYSAL_PYPI=false PYSAL_PLUS=false
language: minimal
sudo: false

matrix:
fast_finish: true
include:
- name: "python-3.6-pypi"
env: PY=3.6 PYSAL_PYPI=true PYSAL_PLUS=false
- name: "python-3.6-pypi-plus"
env: PY=3.6 PYSAL_PYPI=true PYSAL_PLUS=true
- name: "python-3.7-pypi"
env: PY=3.7 PYSAL_PYPI=true PYSAL_PLUS=false
- name: "python-3.7-pypi-plus"
env: PY=3.7 PYSAL_PYPI=true PYSAL_PLUS=true
- name: "tarball-pypi"
env: PY=3.7 PYSAL_PYPI=true PYSAL_PLUS=false
- name: "tarball-pypi-plus"
env: PY=3.7 PYSAL_PYPI=true PYSAL_PLUS=true
- name: "python-3.6"
env: PY=3.6 PYSAL_PYPI=false PYSAL_PLUS=false
- name: "python-3.6-plus"
env: PY=3.6 PYSAL_PYPI=false PYSAL_PLUS=true
- name: "python-3.7"
env: PY=3.7 PYSAL_PYPI=false PYSAL_PLUS=false
- name: "python-3.7-plus"
env: PY=3.7 PYSAL_PYPI=false PYSAL_PLUS=true
- name: "tarball"
env: PY=3.7 PYSAL_PYPI=false PYSAL_PLUS=false
- name: "tarball-plus"
env: PY=3.7 PYSAL_PYPI=false PYSAL_PLUS=true
allow_failures:
- python: 3.6
env: PYSAL_PYPI=false PYSAL_PLUS=false
- python: 3.6
env: PYSAL_PYPI=false PYSAL_PLUS=true
- python: 3.7
env: PYSAL_PYPI=false PYSAL_PLUS=false
- python: 3.7
env: PYSAL_PYPI=false PYSAL_PLUS=true
- name: "python-3.6"
env: PY=3.6 PYSAL_PYPI=false PYSAL_PLUS=false
- name: "python-3.6-plus"
env: PY=3.6 PYSAL_PYPI=false PYSAL_PLUS=true
- name: "python-3.7"
env: PY=3.7 PYSAL_PYPI=false PYSAL_PLUS=false
- name: "python-3.7-plus"
env: PY=3.7 PYSAL_PYPI=false PYSAL_PLUS=true
- name: "tarball"
env: PY=3.7 PYSAL_PYPI=false PYSAL_PLUS=false
- name: "tarball-plus"
env: PY=3.7 PYSAL_PYPI=false PYSAL_PLUS=true

before_install:
- wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
- chmod +x miniconda.sh
- ./miniconda.sh -b -p ./miniconda
- export PATH=`pwd`/miniconda/bin:$PATH
- conda update --yes conda
- conda config --add channels conda-forge
- conda config --set channel_priority strict
- conda create -y -q -n test-env python=$TRAVIS_PYTHON_VERSION
- source activate test-env
- |
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
bash miniconda.sh -b -p $HOME/miniconda
export PATH="$HOME/miniconda/bin:$PATH"
conda config --set always_yes yes --set changeps1 no --set show_channel_urls true
conda update --quiet conda
conda config --add channels conda-forge --force
conda config --set channel_priority strict
conda config --set safety_checks disabled
conda create --name TEST python=$PY --file requirements.txt --file requirements_dev.txt --file requirements_docs.txt --file requirements_tests.txt
source activate TEST
conda info --all
install:
- conda install --yes pip
- pip install -e . --no-deps --force-reinstall
- if "$PYSAL_PYPI"; then
echo 'testing conda libpysal' && conda install --yes libpysal;
else echo 'testing git libpysal';
Expand All @@ -48,12 +67,16 @@ install:
- if [ "$PYSAL_PLUS" == true ]; then
echo 'plus testing'; conda install --yes --file requirements_plus.txt;
fi;
- conda install --yes --file requirements.txt
- pip install -r requirements_dev.txt -r requirements_docs.txt

script:
- python setup.py sdist >/dev/null
- nosetests --verbose --with-doctest --with-coverage --cover-package=spaghetti;
- if [[ $TRAVIS_JOB_NAME == python-* ]]; then
travis_wait 45 nosetests --verbose --with-coverage --with-doctest --cover-package=spaghetti ;
fi

- if [[ $TRAVIS_JOB_NAME == tarball* ]]; then
pip wheel . -w dist --no-deps ;
twine check dist/* ;
fi

notifications:
email:
Expand Down
4 changes: 3 additions & 1 deletion requirements_tests.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@ nose
nose-progressive
coverage
coveralls
matplotlib
matplotlib
twine
wheel

0 comments on commit c577c8c

Please sign in to comment.