forked from python-visualization/folium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
129 lines (111 loc) · 3.99 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
language: minimal
sudo: false
env:
- MOZ_HEADLESS=1
addons:
firefox: latest
env:
global:
- secure: "MTRxGE7N7I60vOk3f32NZjL2BLmP1H0W11HqfcbDO9IEN9Pb47mXQW6rNF0ZqOTt78kWtcHsR2non+nrLIjkglAb4psjUWOdQVh73y3JU4OrXqGCLssgIq9m6fMGOeFWvdektKG4v0TlnYwLhd6Lzes6eTrc+Z2UMHf4dZtuOPs="
matrix:
fast_finish: true
include:
- name: default
env: PY=3.7
- name: notebooks-conding-standard
env: PY=3.7
- name: notebooks-code
env: PY=3.7
- name: latest-branca
env: PY=3.7
- name: docs
env: PY=3.7
- name: "tarball"
env: PY=3.7
allow_failures:
- name: latest-branca
env: PY=3.7
- name: linkcheck
env: PY=3.7
- name: notebooks-conding-standard
env: PY=3.7
before_install:
# Install miniconda and create TEST env.
- |
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
bash miniconda.sh -b -p $HOME/miniconda
export PATH="$HOME/miniconda/bin:$PATH"
conda config --set always_yes yes --set changeps1 no --set show_channel_urls true
conda update conda --quiet
conda config --add channels conda-forge --force
conda config --set channel_priority strict
conda config --set safety_checks disabled
conda create --name TEST python=$PY --file requirements.txt --file requirements-dev.txt
source activate TEST
# Install firefox headless driver.
- |
wget https://github.com/mozilla/geckodriver/releases/download/v0.23.0/geckodriver-v0.23.0-linux64.tar.gz -O geckodriver.tar.gz
mkdir geckodriver
tar -xzf geckodriver.tar.gz -C geckodriver
export PATH=$PATH:$PWD/geckodriver
# Test source distribution.
install:
- pip install -e . --no-deps --force-reinstall
script:
- if [[ $TRAVIS_JOB_NAME == 'tarball' ]]; then
pip wheel . -w dist --no-deps ;
check-manifest --verbose ;
twine check dist/* ;
fi
- if [[ $TRAVIS_JOB_NAME != 'docs' ]]; then
cp -r tests/ examples/ /tmp ;
fi
- if [[ $TRAVIS_JOB_NAME == 'default' ]]; then
pytest /tmp -vv --ignore=tests/notebooks/test_notebooks.py ;
fi
- if [[ $TRAVIS_JOB_NAME == 'latest-branca' ]]; then
conda uninstall branca ;
pip install git+https://github.com/python-visualization/branca.git ;
pytest /tmp -vv --ignore=tests/notebooks/test_notebooks.py ;
fi
- if [[ $TRAVIS_JOB_NAME == 'notebooks-conding-standard' ]]; then
for NB in $(find . -type f -name "*.ipynb");
do jupyter nbconvert --template=tests/strip_markdown.tpl --stdout --to python "${NB}" | flake8 - --ignore=W391,E226,E402,,W504,I100,I201,I202 --max-line-length=120 --show-source ;
done ;
fi
- if [[ $TRAVIS_JOB_NAME == 'notebooks-code' ]]; then
pytest --nbval-lax /tmp/examples ;
fi
# Docs
- |
if [[ $TRAVIS_JOB_NAME == 'docs' ]]; then
set -e
conda install doctr
cp examples/Quickstart.ipynb docs/quickstart.ipynb
pushd docs
make clean html
popd
if [[ -z "$TRAVIS_TAG" ]]; then
python -m doctr deploy --build-tags --key-path github_deploy_key_python_visualization_folium.enc --built-docs docs/_build/html/ dev
else
python -m doctr deploy --build-tags --key-path github_deploy_key_python_visualization_folium.enc --built-docs docs/_build/html/ "version-$TRAVIS_TAG"
python -m doctr deploy --build-tags --key-path github_deploy_key_python_visualization_folium.enc --built-docs docs/_build/html/ .
fi
fi
- if [[ $TRAVIS_JOB_NAME == 'linkcheck' ]]; then
cp examples/Quickstart.ipynb docs/quickstart.ipynb ;
pushd docs && make clean html linkcheck && popd ;
fi
deploy:
skip_cleanup: true
provider: pypi
user: ocefpaf
password:
secure: "BdJc76Z+DnmmamZSX+QCGZDnf+FW/JQOnVZ2t59r2r2RM4860Wf6GSL/Ncw6v8G3sOghWQcMzFdY5e6aNzAW0Ddm2YKHAsfxgurbEsnlzwsNPBWv2280ca7TtlFk2JkqhtYQOkoBFbA8+e/lC8ZC6aAVffQAT1NE4lEs0/Jd+TA="
distributions: sdist bdist_wheel
upload_docs: no
on:
repo: python-visualization/folium
tags: true
all_branches: master
condition: '$TRAVIS_JOB_NAME == "default"'