Skip to content

Commit b9b6fbd

Browse files
lmeyerovclaude
andcommitted
fix(ci): use setup.py docs extras for RST linting dependencies
Changed lint-docs-rst job to install dependencies via setup.py's [docs] extras instead of installing rstcheck directly. This ensures: - Consistent dependency versions across all docs-related jobs - Single source of truth for documentation dependencies - Proper installation of all required docs tools, not just rstcheck 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent f0277c9 commit b9b6fbd

1 file changed

Lines changed: 36 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,8 +395,43 @@ jobs:
395395
echo "✅ py.typed marker confirmed in wheel distribution"
396396
397397
398+
lint-docs-rst:
399+
needs: changes
400+
# Run if docs changed OR infrastructure changed OR manual/scheduled run
401+
if: ${{ needs.changes.outputs.docs == 'true' || needs.changes.outputs.infra == 'true' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' }}
402+
runs-on: ubuntu-latest
403+
timeout-minutes: 2
404+
405+
steps:
406+
- name: Checkout repo
407+
uses: actions/checkout@v3
408+
409+
- name: Set up Python 3.10
410+
uses: actions/setup-python@v4
411+
with:
412+
python-version: '3.10'
413+
414+
- name: Install docs dependencies
415+
run: |
416+
python -m pip install --upgrade pip
417+
python -m pip install -e .[docs]
418+
419+
- name: Validate RST syntax
420+
run: |
421+
if [ -f .rstcheck.cfg ]; then
422+
echo "Using .rstcheck.cfg configuration"
423+
else
424+
echo "Warning: .rstcheck.cfg not found"
425+
fi
426+
# Run validation script if it exists, otherwise run rstcheck directly
427+
if [ -f bin/validate-docs.sh ]; then
428+
./bin/validate-docs.sh
429+
else
430+
find docs -name "*.rst" -exec rstcheck --config .rstcheck.cfg {} +
431+
fi
432+
398433
test-docs:
399-
needs: [changes, python-lint-types]
434+
needs: [changes, python-lint-types, lint-docs-rst]
400435
# Run if docs changed OR Python changed OR infrastructure changed OR manual/scheduled run
401436
if: ${{ needs.changes.outputs.docs == 'true' || needs.changes.outputs.python == 'true' || needs.changes.outputs.infra == 'true' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' }}
402437
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)