Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions .github/workflows/esphome-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,16 @@ jobs:
- name: 🧪 Run Coverage Check
env:
TERM: xterm
run: |
./tools/check_coverage.sh
run: ./tools/check_build_coverage.sh

# Step 3 : Build & Validate Documentation
docs:
runs-on: ubuntu-latest
steps:
- name: 📥 Checkout repository
uses: actions/checkout@v6
with:
fetch-depth: 0

- name: 🐍 Set up Python
uses: actions/setup-python@v6
Expand All @@ -50,10 +51,11 @@ jobs:
sed -i "/esphome/d" requirements.txt
pip install -r requirements.txt

- name: 📄 Check Documentation Coverage
run: ./tools/check_documentation_coverage.sh

- name: 🏗️ MkDocs Build
run: |
# Remove plugin not supported in CI which has no impact in documentation check
sed -i '/git-revision-date-localized:/,+1d' mkdocs.yml
# The --strict flag causes the build to fail if any warnings or broken links are detected
mkdocs build --strict

Expand Down
7 changes: 4 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
esphome==2026.3.2
mkdocs==1.6.1
mkdocs-git-revision-date-localized-plugin==1.5.1
mkdocs-glightbox==0.5.2
mkdocs-include-markdown-plugin==7.2.2
mkdocs-material==9.7.6
mkdocs-material-extensions==1.3.1
mkdocs-material==9.7.6
mkdocs-minify-plugin==0.8.0
mkdocs-static-i18n==1.3.1
pymdown-extensions==10.21.2
mkdocs==1.6.1
pymdown-extensions==10.21.2
File renamed without changes.
29 changes: 29 additions & 0 deletions tools/check_documentation_coverage.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/bin/bash

# Check that every module in solar_router/ has corresponding English documentation
echo "Checking documentation coverage for solar_router modules..."
MISSING_DOCS=0

for yaml_file in solar_router/*.yaml; do
# Extract base name without extension
base_name=$(basename "$yaml_file" .yaml)

# Skip files ending with _common.yaml
if [[ "$base_name" == *common ]]; then
continue
fi

# Check if corresponding .md file exists in docs/en/
doc_file="docs/en/${base_name}.md"
if [ ! -f "$doc_file" ]; then
echo "❌ Missing documentation: $doc_file"
MISSING_DOCS=$((MISSING_DOCS + 1))
fi
done

if [ $MISSING_DOCS -gt 0 ]; then
echo "❌ Found $MISSING_DOCS modules without English documentation"
exit 1
else
echo "✅ All modules have English documentation"
fi
Loading