1
0
mirror of https://github.com/kevin1024/vcrpy.git synced 2025-12-09 01:03:24 +00:00

Create action to validate docs

This commit is contained in:
Jair Henrique
2023-07-20 17:55:18 -03:00
parent 3ad462e766
commit cf3ffcad61
4 changed files with 25 additions and 23 deletions

23
.github/workflows/docs.yml vendored Normal file
View File

@@ -0,0 +1,23 @@
name: Validate docs
on:
push:
paths:
- 'docs/**'
jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install build dependencies
run: pip install -r docs/requirements.txt
- name: Rendering HTML documentation
run: sphinx-build -b html docs/ html
- name: Inspect html rendered
run: cat html/index.html

View File

@@ -18,7 +18,7 @@ The following HTTP libraries are supported:
- ``boto3`` - ``boto3``
- ``http.client`` - ``http.client``
- ``httplib2`` - ``httplib2``
- ``requests`` (both 1.x and 2.x versions) - ``requests`` (>=2.16.2 versions)
- ``tornado.httpclient`` - ``tornado.httpclient``
- ``urllib2`` - ``urllib2``
- ``urllib3`` - ``urllib3``

View File

@@ -63,7 +63,7 @@ tests_require = [
"pytest", "pytest",
"pytest-aiohttp", "pytest-aiohttp",
"pytest-httpbin", "pytest-httpbin",
"requests", "requests>=2.16.2",
"tornado", "tornado",
# Needed to un-break httpbin 0.7.0. For httpbin >=0.7.1 and after, # Needed to un-break httpbin 0.7.0. For httpbin >=0.7.1 and after,
# this pin and the dependency itself can be removed, provided # this pin and the dependency itself can be removed, provided

21
tox.ini
View File

@@ -44,27 +44,6 @@ deps =
ruff ruff
basepython = python3.10 basepython = python3.10
[testenv:docs]
# Running sphinx from inside the "docs" directory
# ensures it will not pick up any stray files that might
# get into a virtual environment under the top-level directory
# or other artifacts under build/
changedir = docs
# The only dependency is sphinx
# If we were using extensions packaged separately,
# we would specify them here.
# A better practice is to specify a specific version of sphinx.
deps =
sphinx
sphinx_rtd_theme
# This is the sphinx command to generate HTML.
# In other circumstances, we might want to generate a PDF or an ebook
commands =
sphinx-build -W -b html -d {envtmpdir}/doctrees . {envtmpdir}/html
# We use Python 3.8. Tox sometimes tries to autodetect it based on the name of
# the testenv, but "docs" does not give useful clues so we have to be explicit.
basepython = python3.8
[testenv] [testenv]
# Need to use develop install so that paths # Need to use develop install so that paths
# for aggregate code coverage combine # for aggregate code coverage combine