diff --git a/.travis.yml b/.travis.yml index 068ea3cc788..ee8ffcc4d5e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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: @@ -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 diff --git a/doc/environment.yml b/doc/environment.yml index b14fba351c1..2758612c139 100644 --- a/doc/environment.yml +++ b/doc/environment.yml @@ -18,3 +18,4 @@ dependencies: - sphinx-gallery - zarr - iris + - flake8 diff --git a/doc/installing.rst b/doc/installing.rst index b6ec2bd841f..b9a1fff59cc 100644 --- a/doc/installing.rst +++ b/doc/installing.rst @@ -78,6 +78,7 @@ Testing ------- To run the test suite after installing xarray, first install (via pypi or conda) + - `py.test `__: Simple unit testing library - `mock `__: additional testing library required for python version 2