Skip to content
This repository was archived by the owner on Nov 19, 2024. It is now read-only.

Commit e953555

Browse files
committed
CI/CD: Added sphinx-lint
1 parent 459131d commit e953555

File tree

3 files changed

+34
-0
lines changed

3 files changed

+34
-0
lines changed

.github/workflows/linting.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,3 +109,29 @@ jobs:
109109
pip install types-flask
110110
- name: Lint with mypy
111111
run: mypy flask_utils
112+
113+
lint-sphinx:
114+
name: Checking documentation with Sphinx
115+
runs-on: ubuntu-latest
116+
steps:
117+
- uses: actions/checkout@v4
118+
- name: Setup Python
119+
uses: actions/setup-python@v5
120+
with:
121+
python-version: '3.11'
122+
cache: 'pip'
123+
cache-dependency-path: |
124+
requirements.txt
125+
requirements-dev.txt
126+
- uses: actions/cache@v4
127+
with:
128+
path: ~/.cache/pip
129+
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
130+
restore-keys: |
131+
${{ runner.os }}-pip-
132+
- name: Install requirements
133+
run: |
134+
python -m pip install --upgrade pip
135+
pip install -r requirements-dev.txt
136+
- name: Lint with sphinx
137+
run: sphinx-lint -i .venv -i .tox

.pre-commit-config.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,10 @@ repos:
4545
- id: requirements-txt-fixer
4646
- id: trailing-whitespace
4747
args: [--markdown-linebreak-ext=md]
48+
- repo: https://github.com/sphinx-contrib/sphinx-lint
49+
rev: v0.9.1
50+
hooks:
51+
- id: sphinx-lint
52+
args:
53+
- -i .venv
54+
- -i .tox

requirements-dev.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@ pre-commit
77
pytest
88
pytest-flask
99
reorder-python-imports
10+
sphinx-lint
1011
tox

0 commit comments

Comments
 (0)