Skip to content

Build documentation on TravisCI #1908

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Feb 15, 2018
17 changes: 14 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ matrix:
env: CONDA_ENV=py36-rasterio1.0alpha
- python: 3.6
env: CONDA_ENV=py36-zarr-dev
- python: 3.5
env: CONDA_ENV=docs
allow_failures:
- python: 3.6
env:
Expand Down Expand Up @@ -86,16 +88,25 @@ before_install:
- conda info -a

install:
- conda env create --file ci/requirements-$CONDA_ENV.yml
- if [[ "$CONDA_ENV" == "docs" ]]; then
conda env create -n test_env --file doc/environment.yml;
else
conda env create -n test_env --file ci/requirements-$CONDA_ENV.yml;
fi
- source activate test_env
- conda list
- python setup.py install
- pip install --no-deps -e .
- python xarray/util/print_versions.py

script:
- flake8 -j auto xarray
- python -OO -c "import xarray"
- py.test xarray --cov=xarray --cov-config ci/.coveragerc --cov-report term-missing --verbose $EXTRA_FLAGS
- if [[ "$CONDA_ENV" == "docs" ]]; then
conda install -c conda-forge sphinx_rtd_theme;
sphinx-build -n -b html -d _build/doctrees doc _build/html;
else
py.test xarray --cov=xarray --cov-config ci/.coveragerc --cov-report term-missing --verbose $EXTRA_FLAGS;
fi

after_success:
- coveralls
1 change: 1 addition & 0 deletions doc/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ dependencies:
- sphinx-gallery
- zarr
- iris
- flake8
1 change: 1 addition & 0 deletions doc/installing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ Testing
-------

To run the test suite after installing xarray, first install (via pypi or conda)

- `py.test <https://pytest.org>`__: Simple unit testing library
- `mock <https://pypi.python.org/pypi/mock>`__: additional testing library required for python version 2

Expand Down