mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-07-18 04:02:35 +03:00
Add ci stage to test for broken links in documentation
This commit is contained in:
parent
da9288878b
commit
a4ccebade7
24
.github/workflows/main.yml
vendored
24
.github/workflows/main.yml
vendored
|
@ -56,3 +56,27 @@ jobs:
|
|||
- name: Upload coverage
|
||||
run: |
|
||||
codecov -e TOXENV,DJANGO
|
||||
|
||||
test-docs:
|
||||
name: Test documentation links
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.9'
|
||||
|
||||
- name: Install dependencies
|
||||
run: pip install -r requirements/requirements-documentation.txt
|
||||
|
||||
# Start mkdocs server and wait for it to be ready
|
||||
- run: mkdocs serve &
|
||||
- run: WAIT_TIME=0 && until nc -vzw 2 localhost 8000 || [ $WAIT_TIME -eq 5 ]; do sleep $(( WAIT_TIME++ )); done
|
||||
- run: if [ $WAIT_TIME == 5 ]; then echo cannot start mkdocs server on http://localhost:8000; exit 1; fi
|
||||
|
||||
- name: Check links
|
||||
continue-on-error: true
|
||||
run: pylinkvalidate.py -P http://localhost:8000/
|
||||
|
||||
- run: echo "Done"
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
# MkDocs to build our documentation.
|
||||
mkdocs>=1.1.2,<1.2
|
||||
jinja2>=2.10,<3.1.0 # contextfilter has been renamed
|
||||
|
||||
# pylinkvalidator to check for broken links in documentation.
|
||||
pylinkvalidator==0.3
|
||||
|
|
Loading…
Reference in New Issue
Block a user