| 1 |
|
| 2 |
language: minimal |
| 3 |
sudo: false |
| 4 |
|
| 5 |
matrix: |
| 6 |
fast_finish: true |
| 7 |
include: |
| 8 |
- env: ENV=py36-qc |
| 9 |
- env: ENV=docs |
| 10 |
- env: ENV=py36-without-xarray |
| 11 |
- env: ENV=py37 |
| 12 |
|
| 13 |
before_install: |
| 14 |
- wget http://repo.continuum.io/miniconda/Miniconda3-3.16.0-Linux-x86_64.sh -O miniconda.sh; |
| 15 |
- bash miniconda.sh -b -p $HOME/miniconda |
| 16 |
- export PATH="$HOME/miniconda/bin:$PATH" |
| 17 |
- hash -r |
| 18 |
- conda config --set always_yes yes --set changeps1 no --set show_channel_urls true |
| 19 |
- conda update -q conda |
| 20 |
- conda info -a |
| 21 |
|
| 22 |
install: |
| 23 |
- conda env create -n test_env --file ci/requirements-$ENV.yml; |
| 24 |
- source activate test_env |
| 25 |
- conda list |
| 26 |
- pip install --no-deps -e . |
| 27 |
|
| 28 |
script: |
| 29 |
- which python |
| 30 |
- python --version |
| 31 |
- python -c "import cfgrib" |
| 32 |
- if [[ "$ENV" == "docs" ]]; then |
| 33 |
sphinx-build -W -b html docs build/sphinx/html; |
| 34 |
elif [[ "$ENV" == *"-qc" ]]; then |
| 35 |
pytest -v --flakes --doctest-glob="*.rst" --cov=cfgrib --cov cf2cdm --cov-report term-missing --pep8 --mccabe $EXTRA_FLAGS; |
| 36 |
elif [[ "$ENV" == *"-without-xarray" ]]; then |
| 37 |
pytest -v --flakes --cov=cfgrib --cov-report term-missing $EXTRA_FLAGS cfgrib tests; |
| 38 |
else |
| 39 |
pytest -v --flakes --cov=cfgrib --cov cf2cdm --cov-report term-missing $EXTRA_FLAGS; |
| 40 |
fi |
| 41 |
|
| 42 |
after_success: |
| 43 |
- coveralls |