15
15
matrix :
16
16
fast_finish : true
17
17
include :
18
- - name : default-python2
19
- env : TEST_TARGET=default PY=2.7
18
+ - name : legacy-python
19
+ env : PY=2.7
20
20
- name : default
21
- env : TEST_TARGET=default PY=3.7
21
+ env : PY=3.7
22
22
- name : notebooks-conding-standard
23
23
env : PY=3.7
24
24
- name : notebooks-code
25
25
env : PY=3.7
26
- - name : latest_branca
26
+ - name : latest-branca
27
27
env : PY=3.7
28
28
- name : docs
29
29
env : PY=3.7
30
30
allow_failures :
31
- - name : latest_branca
31
+ - name : latest-branca
32
32
env : PY=3.7
33
33
34
34
before_install :
35
- - wget http://bit.ly/miniconda -O miniconda.sh
36
- - bash miniconda.sh -b -p $HOME/miniconda
37
- - export PATH="$HOME/miniconda/bin:$PATH"
38
- - conda config --set always_yes yes --set changeps1 no --set show_channel_urls true
39
- - conda update conda
40
- - conda config --remove channels defaults --force
41
- - conda config --add channels conda-forge --force
42
- - conda create --name TEST python=$PY --file requirements.txt --file requirements-dev.txt
43
- - source activate TEST
44
- # firefox headless driver
45
- - wget https://github.com/mozilla/geckodriver/releases/download/v0.23.0/geckodriver-v0.23.0-linux64.tar.gz -O geckodriver.tar.gz
46
- - mkdir geckodriver
47
- - tar -xzf geckodriver.tar.gz -C geckodriver
48
- - export PATH=$PATH:$PWD/geckodriver
49
-
50
- - if [[ "$PY" == "2.7" ]]; then
51
- conda install mock ;
52
- fi
35
+ # Install miniconda and create TEST env.
36
+ - |
37
+ wget http://bit.ly/miniconda -O miniconda.sh
38
+ bash miniconda.sh -b -p $HOME/miniconda
39
+ export PATH="$HOME/miniconda/bin:$PATH"
40
+ conda config --set always_yes yes --set changeps1 no --set show_channel_urls true
41
+ conda update conda --quiet
42
+ conda config --add channels conda-forge --force
43
+ conda install pycryptosat
44
+ conda config --set safety_checks disabled
45
+ conda config --set channel_priority strict
46
+ conda create --name TEST python=$PY --file requirements.txt --file requirements-dev.txt
47
+ source activate TEST
48
+ # Install firefox headless driver.
49
+ - |
50
+ wget https://github.com/mozilla/geckodriver/releases/download/v0.23.0/geckodriver-v0.23.0-linux64.tar.gz -O geckodriver.tar.gz
51
+ mkdir geckodriver
52
+ tar -xzf geckodriver.tar.gz -C geckodriver
53
+ export PATH=$PATH:$PWD/geckodriver
54
+
53
55
54
56
# Test source distribution.
55
57
install :
56
- - python setup.py sdist && version=$(python setup.py --version) && pushd dist && pip install folium-${version}.tar.gz && popd
58
+ - python setup.py sdist && version=$(python setup.py --version) && pushd dist && pip install --no-deps --force-reinstall folium-${version}.tar.gz && popd
57
59
58
60
script :
59
61
- if [[ $TRAVIS_JOB_NAME != 'docs' ]]; then
60
62
cp -r tests/ examples/ /tmp ;
61
63
fi
62
64
63
- - if [[ $TEST_TARGET == 'default' ]]; then
65
+ - if [[ $TRAVIS_JOB_NAME == 'default' ]]; then
66
+ pytest /tmp -vv --ignore=tests/notebooks/test_notebooks.py ;
67
+ fi
68
+
69
+ - if [[ $TRAVIS_JOB_NAME == 'legacy-python' ]]; then
70
+ conda install mock ;
64
71
pytest /tmp -vv --ignore=tests/notebooks/test_notebooks.py ;
65
72
fi
66
73
67
- - if [[ $TRAVIS_JOB_NAME == 'latest_branca ' ]]; then
74
+ - if [[ $TRAVIS_JOB_NAME == 'latest-branca ' ]]; then
68
75
conda uninstall branca ;
69
76
pip install git+https://github.com/python-visualization/branca.git ;
70
77
pytest /tmp -vv --ignore=tests/notebooks/test_notebooks.py ;
@@ -80,15 +87,21 @@ script:
80
87
pytest --nbval-lax -p no:python /tmp/examples ;
81
88
fi
82
89
83
- - if [[ $TEST_TARGET == 'docs' ]]; then
90
+ # Docs
91
+ - if [[ -z "$TRAVIS_TAG" ]]; then
92
+ DEPLOY_DIR=dev ;
93
+ else
94
+ DEPLOY_DIR="version-$TRAVIS_TAG" ;
95
+ fi
96
+
97
+ - if [[ $TRAVIS_JOB_NAME == 'docs' ]]; then
84
98
set -e ;
85
99
conda install doctr ;
86
100
cp examples/Quickstart.ipynb docs/quickstart.ipynb ;
87
101
pushd docs ;
88
102
make clean html linkcheck ;
89
103
popd ;
90
- python -m doctr deploy --sync .;
91
- python -m doctr deploy --sync --no-require-master --built-docs docs/_build/html "docs-$TRAVIS_BRANCH" ;
104
+ python -m doctr deploy --build-tags --key-path github_deploy_key.enc --built-docs docs/_build/html/ $DEPLOY_DIR ;
92
105
fi
93
106
94
107
doctr :
0 commit comments