forked from python-visualization/folium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
110 lines (94 loc) · 3.33 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
language: minimal
sudo: false
env:
- MOZ_HEADLESS=1
addons:
firefox: latest
env:
global:
- secure: "gRT413onDOvwgiHpNXRsiqo+ZZSjwwBpjZryQ9h6IqYw6cTN9YVivYF15uTMD//mZyFeHRz+F/7/0EG2z+UYIBKbgktiNMbie/KizwRBnCThGpcch1VeizkBkPluWSQXndXM6STkHvn0eZBZBBh0QdTm1qaI0babUmgZuWhrX38="
matrix:
fast_finish: true
include:
- name: default-python2
env: TEST_TARGET=default PY=2.7
- name: default
env: TEST_TARGET=default 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
allow_failures:
- name: latest_branca
env: PY=3.7
before_install:
- wget http://bit.ly/miniconda -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
- conda config --remove channels defaults --force
- conda config --add channels conda-forge --force
- conda create --name TEST python=$PY --file requirements.txt --file requirements-dev.txt
- source activate TEST
# 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
- if [[ "$PY" == "2.7" ]]; then
conda install mock ;
fi
# Test source distribution.
install:
- python setup.py sdist && version=$(python setup.py --version) && pushd dist && pip install folium-${version}.tar.gz && popd
script:
- if [[ $TRAVIS_JOB_NAME != 'docs' ]]; then
cp -r tests/ examples/ /tmp ;
fi
- if [[ $TEST_TARGET == '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 -p no:python /tmp/examples ;
fi
- if [[ $TEST_TARGET == 'docs' ]]; then
set -e ;
conda install doctr ;
cp examples/Quickstart.ipynb docs/quickstart.ipynb ;
pushd docs ;
make clean html linkcheck ;
popd ;
python -m doctr deploy --sync .;
python -m doctr deploy --sync --no-require-master --built-docs docs/_build/html "docs-$TRAVIS_BRANCH" ;
fi
doctr:
require-master: true
sync: False
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"'