Skip to content

Commit f0ea53a

Browse files
author
Sylvain MARIE
committed
Travis build fix for python 2
1 parent 4338e63 commit f0ea53a

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

.travis.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,14 @@ env:
1919
before_install:
2020
# (a) linux dependencies
2121
- sudo apt-get install ant
22-
- sudo apt-get install ant-optional
22+
- sudo apt-get install ant-optional # for junitreports
2323

2424
install:
2525
- pip list
2626
- pip install six setuptools_scm # apparently python 2 requires this
2727
- python ci_tools/py_install.py pip ci_tools/requirements-pip.txt
28+
# this does not work anymore on python 2 so lets only do it when needed
29+
- if [ "${TRAVIS_PYTHON_VERSION}" = "3.5" ]; then pip install mkdocs-material mkdocs; fi;
2830
# travis-specific installs
2931
- pip install PyGithub # for ci_tools/github_release.py
3032
- pip install codecov # See https://github.com/codecov/example-python.
@@ -66,6 +68,7 @@ after_success:
6668
git remote add gh-remote "${GH_REF}";
6769
git fetch gh-remote && git fetch gh-remote gh-pages:gh-pages; # make sure we have the latest gh-remote
6870
# push but only if this is not a build triggered by a pull request
71+
# note: do not use the --dirty flag as it breaks client-side search
6972
if [ "${TRAVIS_PULL_REQUEST}" = "false" ] && [ "${TRAVIS_PYTHON_VERSION}" = "3.5" ]; then echo "Pushing to github"; PYTHONPATH=mini_lambda/ mkdocs gh-deploy -v -f docs/mkdocs.yml --remote-name gh-remote; git push gh-remote gh-pages; fi;
7073
else
7174
echo "File 'ci_tools/github_travis_rsa' has not been created, please check your encrypted repo token in .travis.yml, on the line starting with 'openssl aes-256-cbc...'"

ci_tools/requirements-pip.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,6 @@ pytest-html==1.9.0 # otherwise requires pytest 5
2121
xunitparser
2222

2323
# --- to generate the doc (see .travis)
24-
mkdocs-material #==3.3.0
25-
mkdocs # ==1.0.4 # this is to prevent a version non-compliant with mkdocs-material to be installed.
24+
# not supported in python 2 anymore, so now installed directly in travis.yml
25+
# mkdocs-material #==3.3.0
26+
# mkdocs # ==1.0.4 # this is to prevent a version non-compliant with mkdocs-material to be installed.

0 commit comments

Comments
 (0)