forked from python-visualization/folium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
79 lines (67 loc) · 2.5 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
language: python
sudo: false
env:
global:
- secure: "gRT413onDOvwgiHpNXRsiqo+ZZSjwwBpjZryQ9h6IqYw6cTN9YVivYF15uTMD//mZyFeHRz+F/7/0EG2z+UYIBKbgktiNMbie/KizwRBnCThGpcch1VeizkBkPluWSQXndXM6STkHvn0eZBZBBh0QdTm1qaI0babUmgZuWhrX38="
matrix:
fast_finish: true
include:
- python: 2.7
env: TEST_TARGET=default
- python: 3.6
env: TEST_TARGET=default
- python: 3.6
env: TEST_TARGET=notebooks
- python: 3.6
env: TEST_TARGET=latest_branca
- python: 3.6
env: TEST_TARGET=docs
allow_failures:
- python: 2.7
env: TEST_TARGET=latest_branca
- python: 3.6
env: TEST_TARGET=latest_branca
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 --add channels conda-forge --force
- conda create --name TEST python=$TRAVIS_PYTHON_VERSION phantomjs --file requirements.txt --file requirements-dev.txt
- source activate TEST
- if [[ "$TRAVIS_PYTHON_VERSION" == "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 [[ $TEST_TARGET != 'docs' ]]; then
cp -r tests/ examples/ /tmp && cd /tmp ;
fi
- if [[ $TEST_TARGET == 'default' ]]; then
py.test -vv --ignore=tests/notebooks/test_notebooks.py ;
fi
- if [[ $TEST_TARGET == 'latest_branca' ]]; then
conda uninstall branca ;
pip install git+https://github.com/python-visualization/branca.git ;
py.test -vv --ignore=tests/notebooks/test_notebooks.py ;
fi
- if [[ $TEST_TARGET == 'notebooks' ]]; then
for file in $(find . -type f -name "*.ipynb"); do jupyter nbconvert --template=tests/strip_markdown.tpl --stdout --to python $file | grep -v '^get_ipython' | flake8 - --ignore=W391,E226,E402,I100 --max-line-length=100 --show-source ; done ;
py.test -vv tests/notebooks/test_notebooks.py ;
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