forked from holoviz/holoviews
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
171 lines (147 loc) · 5.96 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
# 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).
git:
depth: 100
language: generic
os:
- linux
dist: xenial
notifications:
email:
on_failure: change # [always|never|change] default: always
env:
global:
- PYENV_VERSION=3.7
- PKG_TEST_PYTHON="--test-python=py37 --test-python=py27"
- CHANS_DEV="-c pyviz/label/dev -c bokeh -c conda-forge"
- CHANS="-c pyviz"
- MPLBACKEND="Agg"
- PYTHON_VERSION=3.7
stages:
- test
- name: extra_tests
if: type = cron
- name: conda_dev_package
if: tag =~ ^v(\d+|\.)+([a-z]|rc)\d+$
- name: pip_dev_package
if: tag =~ ^v(\d+|\.)+([a-z]|rc)\d+$
- name: conda_package
if: tag =~ ^v(\d+|\.)*[^a-z]\d*$
- name: pip_package
if: tag =~ ^v(\d+|\.)*[^a-z]\d*$
- name: docs
if: tag =~ ^v(\d+|\.)*[^a-z]\d*$
- name: gallery
if: tag =~ ^v(\d+|\.)*[^a-z]\d*$
- name: docs_dev
if: tag =~ ^v(\d+|\.)+([a-z]|rc)\d+$
- name: gallery_dev
if: tag =~ ^v(\d+|\.)+([a-z]|rc)\d+$
- name: docs_daily
if: ((type = cron) OR ((commit_message =~ /\[doc-build\]/) and branch = master))
- name: gallery_daily
if: ((type = cron) OR ((commit_message =~ /\[doc-build\]/) and branch = master))
jobs:
include:
########## Test Stage ##########
- &default
stage: test
env: DESC="Python 3.6 tests" HV_REQUIREMENTS="unit_tests" PYTHON_VERSION=3.6
before_install:
- pip install pyctdev && doit miniconda_install && pip uninstall -y doit pyctdev
- export PATH="$HOME/miniconda/bin:$PATH" && hash -r
- conda config --set always_yes True
- conda install -c pyviz "pyctdev>=0.5" && doit ecosystem_setup
install:
- doit env_create $CHANS_DEV --python=$PYTHON_VERSION
- source activate test-environment
- travis_wait 30 doit develop_install $CHANS_DEV -o $HV_REQUIREMENTS
- doit env_capture
script:
- doit test_all_recommended
after_success: coveralls
after_failure: sleep 10
- <<: *default
env: DESC="Python 2.7 tests" PYTHON_VERSION=2.7 HV_REQUIREMENTS="unit_tests"
- &basic_deps
<<: *default
stage: extra_tests
env: DESC="Basic dependencies" HV_REQUIREMENTS="basic_tests"
after_success: echo "Success"
script:
- doit test_unit
########## DOCS ##########
- &doc_build
<<: *default
stage: docs_dev
env: DESC="docs" HV_DOC_GALLERY="false" HV_DOC_REF_GALLERY="true" HV_REQUIREMENTS="doc" PANEL_EMBED="true" PANEL_EMBED_JSON="true" PANEL_EMBED_JSON_PREFIX="json"
script:
- conda install $CHANS_DEV firefox geckodriver
- bokeh sampledata
- nbsite generate-rst --org pyviz --project-name holoviews --skip ^reference
- python ./doc/generate_modules.py holoviews -d ./doc/reference_manual -n holoviews -e tests
- nbsite build --what=html --output=builtdocs
after_success:
- aws s3 sync --quiet ./ s3://holoviews-doc-builds/$TRAVIS_BUILD_NUMBER --exclude=".git/*" --exclude="doc/nbpublisher/*"
- &gallery_build
<<: *doc_build
stage: gallery_dev
env: DESC="gallery" HV_DOC_GALLERY="true" HV_DOC_REF_GALLERY="false" BUCKET="dev." HV_REQUIREMENTS="doc" PANEL_EMBED="true" PANEL_EMBED_JSON="true" PANEL_EMBED_JSON_PREFIX="json"
script:
- conda install $CHANS_DEV firefox geckodriver
- bokeh sampledata
- aws s3 sync --quiet s3://holoviews-doc-builds/$TRAVIS_BUILD_NUMBER ./
- git reset --hard --recurse-submodule
- nbsite build --what=html --output=builtdocs
after_success:
- aws s3 sync --quiet ./builtdocs s3://${BUCKET}holoviews.org/
- aws s3 rm --recursive --quiet s3://holoviews-doc-builds/$TRAVIS_BUILD_NUMBER
- <<: *doc_build
stage: docs_daily
- <<: *gallery_build
stage: gallery_daily
env: DESC="gallery" HV_DOC_GALLERY="true" HV_DOC_REF_GALLERY="false" BUCKET="build." HV_REQUIREMENTS="doc" PANEL_EMBED="true" PANEL_EMBED_JSON="true" PANEL_EMBED_JSON_PREFIX="json"
- <<: *doc_build
stage: docs
- <<: *gallery_build
stage: gallery
env: DESC="gallery" HV_DOC_GALLERY="true" HV_DOC_REF_GALLERY="false" HV_REQUIREMENTS="doc" PANEL_EMBED="true" PANEL_EMBED_JSON="true" PANEL_EMBED_JSON_PREFIX="json"
after_success:
- aws s3 sync ./builtdocs s3://holoviews.org/
########## END-USER PACKAGES ##########
### CONDA ####
- &conda_pkg
<<: *default
stage: conda_dev_package
env: DESC="" TRAVIS_NOCACHE=$TRAVIS_JOB_ID CHANS_DEV="-c pyviz/label/dev -c bokeh/label/dev"
install:
- doit package_build $CHANS_DEV $PKG_TEST_PYTHON --test-group=unit
script:
- doit package_upload --token=$CONDA_UPLOAD_TOKEN --label=dev
- <<: *conda_pkg
stage: conda_package
env: DESC="" TRAVIS_NOCACHE=$TRAVIS_JOB_ID CHANS="-c pyviz -c bokeh"
install:
- doit package_build $CHANS $PKG_TEST_PYTHON --test-group=unit
script:
- doit package_upload --token=$CONDA_UPLOAD_TOKEN --label=dev --label=main
### PyPI ###
- &pip_pkg
<<: *default
stage: pip_dev_package
env: PYPI="https://test.pypi.org/legacy/" TRAVIS_NOCACHE=$TRAVIS_JOB_ID
install:
- travis_wait 30 doit develop_install $CHANS_DEV -o unit_tests && pip uninstall -y holoviews
- doit pip_on_conda
- doit ecosystem=pip package_build
script: doit ecosystem=pip package_upload -u $TPPU -p $TPPP -r ${PYPI}
- <<: *pip_pkg
stage: pip_package
env: PYPI="https://upload.pypi.org/legacy/" TRAVIS_NOCACHE=$TRAVIS_JOB_ID
install:
- travis_wait 30 doit develop_install $CHANS_DEV -o unit_tests && pip uninstall -y holoviews
- doit pip_on_conda
- doit ecosystem=pip package_build
script: doit ecosystem=pip package_upload -u $PPU -p $PPP -r ${PYPI}