Skip to content

Commit e31eb7c

Browse files
committed
Use tox configuration for documentation link check
1 parent 8a38709 commit e31eb7c

File tree

2 files changed

+15
-10
lines changed

2 files changed

+15
-10
lines changed

.travis.yml

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ matrix:
2424
- { python: "3.7", env: TOXENV=base }
2525
- { python: "3.7", env: TOXENV=lint }
2626
- { python: "3.7", env: TOXENV=docs }
27+
- { python: "3.7", env: TOXENV=docs-links }
2728

2829
- python: "3.7"
2930
env: TOXENV=dist
@@ -33,18 +34,9 @@ matrix:
3334
- tox --installpkg ./dist/djangorestframework-*.whl
3435
- tox # test sdist
3536

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-
4537
allow_failures:
4638
- env: DJANGO=master
47-
- env: DOCS=links
39+
- env: TOXENV=docs-links
4840

4941
install:
5042
- pip install tox tox-venv tox-travis

tox.ini

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,16 @@ commands = mkdocs build
5757
deps =
5858
-rrequirements/requirements-testing.txt
5959
-rrequirements/requirements-documentation.txt
60+
61+
62+
[testenv:docs-links]
63+
basepython = python3.7
64+
skip_install = true
65+
commands =
66+
mkdocs serve \&
67+
WAIT_TIME = 0
68+
until nc -vzw 2 localhost 8000 || [ $WAIT_TIME -eq 5 ]; do sleep $(( WAIT_TIME++ )); done
69+
if [ $WAIT_TIME -eq 5 ]; then echo cannot start mkdocs server on http://localhost:8000; exit 1; fi
70+
pylinkvalidate.py -P http://localhost:8000/
71+
deps =
72+
-rrequirements/requirements-documentation.txt

0 commit comments

Comments
 (0)