/
.travis.yml
73 lines (68 loc) · 2.32 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# We deliberately don't use travis's language=python option because
# we install miniconda and use conda to get python. Additionally,
# Travis's auto-install of python doesn't work on osx images (see
# https://github.com/travis-ci/travis-ci/issues/4729).
language: generic
stages:
- test
- doc
jobs:
include:
- &default
stage: test
os: linux
env:
- PYTHON_VERSION="3.6"
install:
# Install conda
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
wget https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -O miniconda.sh;
else
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
fi
- bash miniconda.sh -b -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"
- conda config --set always_yes yes --set changeps1 no
- conda update conda
# it might be faster to start from anaconda instead of miniconda
- travis_wait 20 conda env create
- source activate pyviz
# dependencies for tests etc
- pip install flake8
- conda env export
- conda list
script:
- python download_sample_data.py
# python ./etc/test_notebooks.py lint
- python ./etc/test_notebooks.py
- <<: *default
os: osx
before_install:
# brew-installed geos interferes with cartopy?
- brew uninstall --ignore-dependencies geos gdal postgis
if: branch = master AND type != pull_request
- <<: *default
stage: doc
script:
- python download_sample_data.py
- conda install -c conda-forge 'sphinx<1.7' beautifulsoup4 graphviz
- pip install nbsite
- pip install sphinx_ioam_theme
- cd doc/tutorial
- nbsite_nbpagebuild.py pyviz pyviz ../../notebooks . 1
- cd ..
- sphinx-build -b html . ./_build/html
- nbsite_fix_links.py _build/html
- cp -r ../notebooks/assets _build/html/tutorial/
- touch ./_build/html/.nojekyll
- nbsite_cleandisthtml.py ./_build/html take_a_chance
- cd ..
deploy:
provider: pages
skip_cleanup: true
github_token: $GITHUB_TOKEN
local_dir: ./doc/_build/html
on:
tags: true
notifications:
email: false