# Based on http://conda.pydata.org/docs/travis.html language: minimal sudo: false # use container based build matrix: fast_finish: true include: - env: ENV=py36-qc - env: ENV=docs - env: ENV=py36-without-xarray - env: ENV=py37 before_install: - wget http://repo.continuum.io/miniconda/Miniconda3-3.16.0-Linux-x86_64.sh -O miniconda.sh; - bash miniconda.sh -b -p $HOME/miniconda - export PATH="$HOME/miniconda/bin:$PATH" - hash -r - conda config --set always_yes yes --set changeps1 no --set show_channel_urls true - conda update -q conda - conda info -a install: - conda env create -n test_env --file ci/requirements-$ENV.yml; - source activate test_env - conda list - pip install --no-deps -e . script: - which python - python --version - python -c "import cfgrib" - if [[ "$ENV" == "docs" ]]; then sphinx-build -W -b html docs build/sphinx/html; elif [[ "$ENV" == *"-qc" ]]; then pytest -v --flakes --doctest-glob="*.rst" --cov=cfgrib --cov cf2cdm --cov-report term-missing --pep8 --mccabe $EXTRA_FLAGS; elif [[ "$ENV" == *"-without-xarray" ]]; then pytest -v --flakes --cov=cfgrib --cov-report term-missing $EXTRA_FLAGS cfgrib tests; else pytest -v --flakes --cov=cfgrib --cov cf2cdm --cov-report term-missing $EXTRA_FLAGS; fi after_success: - coveralls