forked from pyviz/pyviz.org
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
91 lines (81 loc) · 2.56 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
sudo: false
language: python
os:
- linux
stages:
- test
- name: build_cache
if: (commit_message =~ /^.*(website_dev).*$/) OR (branch = master)
- name: website_release
if: branch = master
- name: website_dev
if: (commit_message =~ /^.*(website_dev).*$/) OR (branch = master)
jobs:
include:
- &test
stage: test
before_install:
- pip install pyctdev && doit miniconda_install
- export PATH="$HOME/miniconda/bin:$PATH" && hash -r
- doit ecosystem_setup
install:
- doit env_create
- source activate pyviz
- doit env_capture
script:
- if ! [ $(ls -A ./notebooks/**/*.ipynb) ]; then
echo 'No notebooks found' && exit 0;
fi;
- doit test_all
- &build_cache
<<: *test
stage: build_cache
env: BADGE=pypi_downloads
script: python tools/build_cache.py
after_success:
- git config user.email "[email protected]"
- git config user.name "travis"
- mv ./doc/_static/cache ./tmp
- git fetch https://github.com/$TRAVIS_REPO_SLUG.git cache:refs/remotes/cache
- git checkout cache
- mv ./tmp/* ./doc/_static/cache
- git add ./doc/_static/cache
- git commit -m "adding cached badge of $BADGE"
- git push -f -q "https://pyviz-developers:[email protected]/pyviz/website.git" HEAD:cache
- <<: *build_cache
env: BADGE=stars
- <<: *build_cache
env: BADGE=contributors
- <<: *build_cache
env: BADGE=license
- <<: *build_cache
env: BADGE=conda_downloads
script:
- conda install -c conda-forge colorcet fastparquet intake intake-parquet "s3fs>=0.5.1" python-snappy
- python tools/conda_downloads.py
- &website_release
<<: *test
stage: website_release
before_script:
- git checkout -b deploy-${TRAVIS_BRANCH}
- git fetch https://github.com/$TRAVIS_REPO_SLUG.git cache:refs/remotes/cache # all cached badges are in this branc
- git checkout cache -- ./doc/_static/cache
script: doit build_website
deploy:
- provider: pages
skip_cleanup: true
github_token: $GITHUB_TOKEN
local_dir: ./builtdocs
fqdn: pyviz.org
on:
all_branches: true
- <<: *website_release
stage: website_dev
deploy:
- provider: pages
skip_cleanup: true
github_token: $GITHUB_TOKEN
local_dir: ./builtdocs
repo: pyviz-dev/website
on:
all_branches: true