Skip to content

~95% on SimpleQA (e.g. Qwen3.6-27B on a 3090). Supports all local and cloud LLMs (llama.cpp, Ollama, Google, ...). 10+ search engines - arXiv, PubMed, your private documents. Everything Local & Encrypted.

feat(ci): Deploy coverage report to GitHub Pages

LearningCircuit47d910543c4b
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index 109a1ec746..3f5cea6c1f 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -373,7 +373,7 @@ jobs:
path: |
tests/screenshots/
tests/ui_tests/screenshots/
- # Code coverage report
+ # Code coverage report with GitHub Pages deployment
coverage-report:
runs-on: ubuntu-latest
name: Coverage Report
@@ -382,13 +382,19 @@ jobs:
github.ref == 'refs/heads/main' ||
github.ref == 'refs/heads/dev'
+ # Permissions needed for GitHub Pages deployment
+ permissions:
+ contents: write # For pushing to gh-pages branch
+ pull-requests: write # For PR comments
+
env:
TEST_IMAGE: ldr-test
+ PAGES_URL: https://learningcircuit.github.io/local-deep-research/coverage/
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
- persist-credentials: false
+ persist-credentials: true # Needed for gh-pages push
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3
@@ -435,7 +441,9 @@ jobs:
COVERAGE=$(python3 -c "import xml.etree.ElementTree as ET; tree = ET.parse('coverage/coverage.xml'); print(f\"{float(tree.getroot().get('line-rate', 0)) * 100:.1f}%\")" 2>/dev/null || echo "N/A")
echo "**Total Line Coverage: ${COVERAGE}**"
echo ""
- echo "📊 [Download full HTML report](../artifacts) for detailed line-by-line coverage."
+ echo "📊 **[View Full Coverage Report](${{ env.PAGES_URL }})** - Interactive HTML report with line-by-line details"
+ echo ""
+ echo "_Note: Report updates after merge to main/dev branch._"
else
echo "⚠️ Coverage report not generated"
fi
@@ -448,6 +456,86 @@ jobs:
name: coverage-report
path: coverage/
+ # Deploy coverage HTML report to GitHub Pages
+ # Only deploys on main/dev branch pushes (not PRs)
+ - name: Deploy coverage to GitHub Pages
+ if: |
+ always() &&
+ (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev') &&
+ github.event_name == 'push'
+ uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4.0.0
+ with:
+ github_token: ${{ secrets.GITHUB_TOKEN }}
+ publish_dir: ./coverage/htmlcov
+ destination_dir: coverage
+ keep_files: false
+ commit_message: "docs: update coverage report"
+
+ # Add coverage summary as PR comment for easy visibility
+ - name: Comment coverage on PR
+ if: always() && github.event_name == 'pull_request'
+ uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
+ with:
+ script: |
+ const fs = require('fs');
+
+ let coverage = 'N/A';
+ let details = '';
+
+ try {
+ if (fs.existsSync('coverage/coverage.xml')) {
+ const xml = fs.readFileSync('coverage/coverage.xml', 'utf8');
+ const match = xml.match(/line-rate="([^"]+)"/);
+ if (match) {
+ coverage = (parseFloat(match[1]) * 100).toFixed(1) + '%';
+ }
+ }
+ } catch (e) {
+ console.log('Could not parse coverage:', e);
+ }
+
+ const body = `## 📊 Coverage Report
+
+ **Line Coverage: ${coverage}**
+
+ 📈 [View Full Report](${{ env.PAGES_URL }}) _(updates after merge)_
+
+ <details>
+ <summary>ℹ️ About this report</summary>
+
+ - Coverage is calculated from \`src/\` directory
+ - Full interactive HTML report available after merge to main/dev
+ - Download artifacts for immediate detailed view
+
+ </details>`;
+
+ // Find existing comment
+ const { data: comments } = await github.rest.issues.listComments({
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ issue_number: context.issue.number,
+ });
+
+ const botComment = comments.find(c =>
+ c.user.type === 'Bot' && c.body.includes('📊 Coverage Report')
+ );
+
+ if (botComment) {
+ await github.rest.issues.updateComment({
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ comment_id: botComment.id,
+ body: body
+ });
+ } else {
+ await github.rest.issues.createComment({
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ issue_number: context.issue.number,
+ body: body
+ });
+ }
+
# Coverage badge via GitHub Gist + shields.io (no third-party service needed)
# How it works:
# 1. We store a JSON file in a GitHub Gist (gist.github.com - GitHub's snippet/paste service)