Skip to content

Commit eb331de

Browse files
authored
Add documentation testing (gorakhargosh#902)
* Test the documentation builds locally * Test the documentation builds in CI * Fix the lone documentation build warning * Update `AUTHORS` and `changelog.rst`
1 parent ccb5a29 commit eb331de

File tree

6 files changed

+31
-4
lines changed

6 files changed

+31
-4
lines changed

.github/workflows/tests.yml

+18
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ on:
1111
- "setup.*"
1212
- "src/**/*"
1313
- "tests/*.py"
14+
- "docs/**/*"
1415

1516
jobs:
1617
lint:
@@ -56,3 +57,20 @@ jobs:
5657
run: python -m pip install tox
5758
- name: Test
5859
run: python -m tox -e py
60+
61+
docs:
62+
name: Test documentation builds
63+
runs-on: ubuntu-latest
64+
steps:
65+
- name: Checkout
66+
uses: actions/checkout@v2
67+
with:
68+
ref: ${{ github.event.inputs.branch }}
69+
- name: Use Python 3.10
70+
uses: actions/setup-python@v2
71+
with:
72+
python-version: "3.10"
73+
- name: Install test dependencies
74+
run: python -m pip install tox
75+
- name: Test
76+
run: python -m tox -e docs

AUTHORS

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ Gary van der Merwe <[email protected]>
1717
Gora Khargosh <[email protected]>
1818
Hannu Valtonen <[email protected]>
1919
Jesse Printz <[email protected]>
20+
Kurt McKee <[email protected]>
2021
Léa Klein <[email protected]>
2122
Luke McCarthy <[email protected]>
2223
Lukáš Lalinský <[email protected]>

changelog.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ Changelog
88

99
2022-xx-xx • `full history <https://github.com/gorakhargosh/watchdog/compare/v2.1.9...HEAD>`__
1010

11-
-
12-
- Thanks to our beloved contributors: @
11+
- [documentation] HTML documentation builds are now tested for errors.
12+
- Thanks to our beloved contributors: @kurtmckee
1313

1414
2.1.9
1515
~~~~~

docs/source/installation.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Installing from PyPI using pip
1414
$ python -m pip install -U |project_name|
1515
1616
# or to install the watchmedo utility:
17-
$ python -m pip install -U |project_name|[watchmedo]
17+
$ python -m pip install -U |project_name|\[watchmedo]
1818
1919
Installing from source tarballs
2020
-------------------------------

requirements-tests.txt

+1
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ flaky
66
pytest
77
pytest-cov
88
pytest-timeout
9+
sphinx

tox.ini

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tox]
2-
envlist = py{311,310,39,38,37,36,py3}
2+
envlist = py{311,310,39,38,37,36,py3}, docs
33
skip_missing_interpreters = True
44

55
[testenv]
@@ -15,3 +15,10 @@ deps =
1515
-r requirements-tests.txt
1616
commands =
1717
python -m flake8 docs tools src tests setup.py
18+
19+
[testenv:docs]
20+
usedevelop = true
21+
deps =
22+
-r requirements-tests.txt
23+
commands =
24+
sphinx-build -aEWb html docs/source docs/build/html

0 commit comments

Comments
 (0)