Skip to content

ci: integrate code coverage dashboards into documentation and GitHub Pages (#123) - #359

Open
srinivasugithub wants to merge 6 commits into
eclipse-score:mainfrom
bgsw-contrib:feature/issue-123-coverage-dashboards
Open

srinivasugithub wants to merge 6 commits into
eclipse-score:mainfrom
bgsw-contrib:feature/issue-123-coverage-dashboards

Conversation

@srinivasugithub

Copy link
Copy Markdown
Contributor

Summary

Addresses #123 by making detailed, interactive code coverage dashboards available through the docs-as-code documentation site and GitHub Pages deployment.

Key Changes

  • Coverage Pipeline (scripts/quality_runners.py):
    • Fixed C++ coverage output path to use absolute paths (output_dir.resolve()), resolving working directory divergence with bazel_source_directory.
    • Added dynamic lcov version detection (genhtml -v) to handle both lcov 1.14 (--ignore-errors=source,source) and lcov 2.0+ (--ignore-errors=negative,negative,source,source and --synthesize-missing).
    • Fixed Rust coverage by forwarding --out-dir to bazel run //rust_coverage:....
    • Added automatic generation of index.html for Rust module reports (supporting single target redirect and multi-target selection).
    • Added generate_coverage_portal() to automatically create artifacts/coverage/index.html with a consolidated view of all C++ and Rust dashboards.
    • Formatted dashboard links in docs/verification_report/coverage_summary.md using HTML anchor tags to maintain full compatibility with Sphinx myst-parser.
  • Documentation (docs/):
    • Created docs/verification_report/coverage_dashboards.rst providing organized directory listings for all C++ and Rust component-level dashboards and project-level portal.
    • Linked coverage_dashboards in docs/verification_report/platform_verification_report.rst, docs/verification_report/index.rst, and docs/integration_process/step_7_reporting.rst.
  • CI Workflow (.github/workflows/test_and_docs.yml):
    • Added actions/upload-artifact@v4 step to preserve coverage dashboards as a workflow artifact (coverage-dashboards-<sha>).
    • Updated documentation build step to bundle artifacts/coverage/* into _build/coverage/ prior to archiving github-pages.tar, enabling automatic deployment via deploy-versioned-pages.
  • Verification (scripts/known_good/tests/test_coverage_reporting.py & scripts/BUILD):
    • Added unit test coverage for markdown summary generation, Rust target index resolution, coverage portal generation, and C++/Rust log parsing.

Verification

  • bazel test //scripts/known_good:known_good_tests //scripts/tooling:tooling_tests: All passed.
  • bazel run //:docs_shim: Documentation build passed with 0 warnings/errors.
  • End-to-end execution of scripts/quality_runners.py: Verified successful generation of lcov dashboards, coverage portal, and summary table.

…Pages (eclipse-score#123)

- scripts/quality_runners.py:
  * Fix C++ coverage output path by using absolute output directory resolution
    and adding dynamic compatibility for both lcov 1.14 and 2.0+ ignore-errors flags.
  * Fix Rust coverage by passing --out-dir to bazel run //rust_coverage:... targets.
  * Automatically generate Rust target index and top-level central coverage portal.
  * Include interactive dashboard links in coverage_summary.md table.
- docs/verification_report/coverage_dashboards.rst:
  * Create dedicated Code Coverage Dashboards page with links to all C++ and Rust
    component-level reports and project-level portal.
- docs/verification_report/platform_verification_report.rst & index.rst:
  * Add coverage dashboards to navigation toctrees and report sections.
- docs/integration_process/step_7_reporting.rst:
  * Document the publishing of interactive coverage dashboards under /coverage/.
- .github/workflows/test_and_docs.yml:
  * Add upload-artifact step for coverage dashboards.
  * Bundle artifacts/coverage/* into _build/coverage/ before packaging github-pages.tar.
- scripts/known_good/tests/test_coverage_reporting.py & scripts/BUILD:
  * Add unit tests for coverage report formatting, portal generation, and Rust indexing.
@srinivasugithub
srinivasugithub force-pushed the feature/issue-123-coverage-dashboards branch from 9dec95b to 9c48c5a Compare September 23, 2026 08:17
In LCOV 2.0+ (Ubuntu 24.04 noble), 'genhtml -v' acts as '--verbose'
rather than printing the version, causing version detection to fail
and fall back to LCOV 1.x flags without negative-branch ignore options.
Switching to 'genhtml --version' ensures reliable version parsing across
both LCOV 1.x and 2.0+.
@github-actions

Copy link
Copy Markdown

The created documentation from the pull request is available at: docu-html

…html_report

Ensure generated coverage dashboards from artifacts/coverage are copied into
the documentation build output (_build/coverage) during html_report execution.
This guarantees coverage dashboards are bundled into the GitHub Pages archive
and live in PR previews without depending on workflow definitions on main.
…de Quality card

Update the Code Quality card in docs/index.rst to format like the Integration
card by removing the single-page card link and embedding direct links to both
the Platform Verification Report and Code Coverage Dashboards.
…overage-dashboards

Resolve merge conflict in scripts/quality_runners.py by preserving both the status
column reporting and failure annotations from main (eclipse-score#368) alongside the code
coverage portal generation and interactive dashboard links.

@FScholPer FScholPer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As already commented in slack merge makes only sense if the decided to unit test in reference or reuse the results from the modules https://sdvworkinggroup.slack.com/archives/C0864L05332/p1790838881231729

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants