Codebase list cftime / debian/1.0.3.4-2 .travis.yml
debian/1.0.3.4-2

Tree @debian/1.0.3.4-2 (Download .tar.gz)

.travis.yml @debian/1.0.3.4-2raw · history · blame

# Based on http://conda.pydata.org/docs/travis.html
language: minimal

sudo: false # use container based build

notifications:
  email: false

env:
  - PYTHON_VERSION=2.7
  - PYTHON_VERSION=3.6
  - PYTHON_VERSION=3.7

matrix:
  include:
    - env: PYTHON_VERSION=3.7 BUILD_DOCS="true"

before_install:
  # Build the conda testing environment.
  - >
    echo "Installing miniconda and cftime dependencies...";
    wget http://bit.ly/miniconda -O miniconda.sh;
    bash miniconda.sh -b -p ${HOME}/miniconda;
    export PATH="${HOME}/miniconda/bin:${PATH}";
    conda update conda --yes --all;
    conda config --add channels conda-forge --force;
    export ENV_NAME="test-environment";
    conda create --yes -n ${ENV_NAME} python=${PYTHON_VERSION} --file requirements.txt --file requirements-dev.txt;
    source activate ${ENV_NAME};
    if [[ "${BUILD_DOCS}" == "true" ]]; then
      conda install -qy sphinx;
    fi;

  # Log the conda environment and package details.
  - conda list -n ${ENV_NAME}
  - conda list -n ${ENV_NAME} --explicit
  - conda info -a

install:
  # Install cftime.
  - echo "Installing cftime..."
  - CYTHON_COVERAGE=1 pip install -e .

script:
  - if [[ "${BUILD_DOCS}" == "true" ]]; then
      pushd docs && make html linkcheck O=-W && popd;
    else
      pytest;
    fi

after_success:
  - coveralls

before_deploy:
  # Remove unused, unminified javascript from sphinx
  - if [[ "${BUILD_DOCS}" == "true" ]]; then
      rm -f docs/build/html/_static/jquery-*.js;
      rm -f docs/build/html/_static/underscore-*.js;
      rm -f docs/build/html/.buildinfo;
    fi

deploy:
  - provider: script
    script: ci/deploy_docs.sh
    skip_cleanup: true
    on:
      branch: master
      condition: '${PYTHON_VERSION} == 3.7 && ${BUILD_DOCS} == "true"'