Skip to content

Commit 8461b09

Browse files
koumlgabrieldemarmiesse
authored andcommitted
Add document generation test (keras-team#11913)
* Add document generation test in travis.yml and dockerfile * Add mkdocs build test * install mkdocs from pip * tiny fix * tiny fix * remove utf-8 settings
1 parent aefcd8b commit 8461b09

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

.travis.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ install:
5454

5555
# install TensorFlow (CPU version).
5656
- pip install tensorflow==1.9 --progress-bar off
57-
57+
5858
# install cntk
5959
- if [[ "$KERAS_BACKEND" == "cntk" ]] || [[ "$TEST_MODE" == "PEP8_DOC" ]]; then
6060
./.travis/install_cntk.sh;
@@ -69,6 +69,8 @@ install:
6969
- export APP_CHANGED=False;
7070
- for entry in `git diff --name-only HEAD~1`; do if [[ "$entry" == "keras/applications/"* ]]; then export APP_CHANGED=True; fi; done
7171

72+
# install mkdocs
73+
- pip install mkdocs --progress-bar off
7274

7375
# command to run tests
7476
script:
@@ -83,7 +85,7 @@ script:
8385
- if [[ "$TEST_MODE" == "INTEGRATION_TESTS" ]]; then
8486
PYTHONPATH=$PWD:$PYTHONPATH py.test tests/integration_tests;
8587
elif [[ "$TEST_MODE" == "PEP8_DOC" ]]; then
86-
PYTHONPATH=$PWD:$PYTHONPATH py.test --pep8 -m pep8 -n0 && py.test tests/test_documentation.py;
88+
PYTHONPATH=$PWD:$PYTHONPATH py.test --pep8 -m pep8 -n0 && py.test tests/test_documentation.py && cd docs && python autogen.py && mkdocs build;
8789
else
8890
PYTHONPATH=$PWD:$PYTHONPATH py.test tests/ --ignore=tests/integration_tests --ignore=tests/test_documentation.py --ignore=tests/keras/legacy/layers_test.py --cov-config .coveragerc --cov=keras tests/;
8991
fi

docker/Dockerfile

+6-1
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,18 @@ RUN conda install -y python=${python_version} && \
5757
pyyaml \
5858
scikit-learn \
5959
six \
60-
theano && \
60+
theano \
61+
mkdocs \
62+
&& \
6163
git clone git://github.com/keras-team/keras.git /src && pip install -e /src[tests] && \
6264
pip install git+git://github.com/keras-team/keras.git && \
6365
conda clean -yt
6466

6567
ADD theanorc /home/keras/.theanorc
6668

69+
ENV LC_ALL=C.UTF-8
70+
ENV LANG=C.UTF-8
71+
6772
ENV PYTHONPATH='/src/:$PYTHONPATH'
6873

6974
WORKDIR /src

0 commit comments

Comments
 (0)