Skip to content

Commit 8a38709

Browse files
committed
Add travis ci stage to test for broken links in documentation
1 parent 0dac98d commit 8a38709

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

.travis.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,18 @@ matrix:
3333
- tox --installpkg ./dist/djangorestframework-*.whl
3434
- tox # test sdist
3535

36+
- python: "3.7"
37+
env: DOCS=links
38+
script:
39+
- pip install -r requirements/requirements-documentation.txt
40+
- mkdocs serve &
41+
- WAIT_TIME=0 && until nc -vzw 2 localhost 8000 || [ $WAIT_TIME -eq 5 ]; do sleep $(( WAIT_TIME++ )); done
42+
- if [ $WAIT_TIME == 5 ]; then echo cannot start mkdocs server on http://localhost:8000; exit 1; fi
43+
- pylinkvalidate.py -P http://localhost:8000/
44+
3645
allow_failures:
3746
- env: DJANGO=master
47+
- env: DOCS=links
3848

3949
install:
4050
- pip install tox tox-venv tox-travis
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
# MkDocs to build our documentation.
22
mkdocs==1.0.4
3+
4+
# pylinkvalidator to check for broken links in documentation.
5+
pylinkvalidator==0.3

0 commit comments

Comments
 (0)