Skip to content

Commit

Permalink
conditional attempt in matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
snowman2 committed Mar 5, 2020
1 parent 3045472 commit 2321d79
Showing 1 changed file with 25 additions and 40 deletions.
65 changes: 25 additions & 40 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,23 @@ env:
global:
# Doctr deploy key for corteva/rioxarray
- secure: "CWWro84t7SpW3AuV6dE1d4Lcx3V7HZWi47RHovcKTxrcoD0iwu/cYXG3f0yiN81ehFmWOK/4mkCV8bEpF9THdwyoWQdKn0rF92IESy0+ZLdyDy0yvrL/nt2PY7oAL0OH0yuh784eTivhmUmBYjcZZdEDJnymM2Wgf1VgtKDhvqGgk+gzQkO4M4vc7/H7sERkmvH7AvsYhgP9zD2yelwOYfFuNa7n7RkHwymABWwDGXN3ri0wXkRJst3CSccv2BstzVl9K5OHevTdPqyATK5a9D5J8szf4X2oem/bisJsT5w+SyX9tmWJJbItEUsDghcWM3wQqWfguXl5cYQ7Bf7P2LbrphD4Hr5lmOpG9M/mijyL+2nkCoK7woXU4z02TZEX8mO43RmaHIWYOVBi4HRDIpj5Y6MgktctfGk8lg67V5eRjZwG4Jj1mhn+lnCpu2pK5pH0pTmWEM8QFcjF7DadMif38x0KcG74ukExxOX3lXGeN+mZN/eD7z1J3pfTi6U/acXDBtVG2li2YI5dMkEwad/IE8Q5s+TGH1AVFGBPMQWY2VEtRuSTKWZtK/09VEJcbP8CzhDu2I7ZOEvMcNqwUX/aZrNBgbZfZZijkIcC0ToJMfZs1Tg8gl6n+OTEnAuWf/727F8oTNYv0oR/MHCBPdrbQHsXRlZ8b4HZcG+3wNA="

stages:
- test
- name: deploy
if: branch = master

matrix:
include:
- stage: test
os: osx
- os: osx
env:
- PYTHON_VERSION=3.6
- os: linux
env:
- PYTHON_VERSION=3.6
- os: linux
if: branch = master
env:
- PYTHON_VERSION=3.6
- stage: test
os: osx
- DOC=true
- os: osx
env:
- PYTHON_VERSION=3.7
- stage: test
os: linux
- os: linux
env:
- PYTHON_VERSION=3.7
notifications:
Expand All @@ -41,7 +37,6 @@ before_install:
curl -o miniconda.sh https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh;
fi
- bash miniconda.sh -b -p $HOME/miniconda
- rm miniconda.sh
- source $HOME/miniconda/etc/profile.d/conda.sh
- conda activate
# make sure setup.py works before dependencies installed
Expand All @@ -52,39 +47,29 @@ before_install:
- conda config --add channels conda-forge
- conda config --set channel_priority strict
# Create conda environment
- conda create -n test python=$PYTHON_VERSION pillow rasterio scipy xarray netcdf4 dask
- conda create -n test python=$PYTHON_VERSION pillow rasterio scipy xarray netcdf4 dask pandoc
- source activate test

install:
- pip install .[all]
- pip install coveralls

jobs:
include:
- stage: test
name: test
script:
- py.test --cov-report term-missing --cov=rioxarray
- make check
- set -e
- sudo apt-get install -qq pandoc
- make docs
- stage: deploy
name: deploy
# require the branch name to be master (note for PRs this is the base branch name)
if: branch = master
# Building and uploading docs with doctr
script:
- sudo apt-get install -qq pandoc
- make docs
- |
pip install doctr
if [[ -z "$TRAVIS_TAG" ]]; then
DEPLOY_DIR=latest;
else
DEPLOY_DIR="$TRAVIS_TAG";
fi
doctr deploy --build-tags --built-docs docs/_build/html $DEPLOY_DIR
script:
- py.test --cov-report term-missing --cov=rioxarray
- make check
- make docs
# Building and uploading docs with doctr
- set -e
- |
if [ "$DOC" ]; then
pip install doctr
if [[ -z "$TRAVIS_TAG" ]]; then
DEPLOY_DIR=latest;
else
DEPLOY_DIR="$TRAVIS_TAG";
fi
doctr deploy --build-tags --built-docs docs/_build/html $DEPLOY_DIR
fi
after_success:
# Coveralls stats for code coverage
Expand Down

0 comments on commit 2321d79

Please sign in to comment.