From e27057e44d59718951b3952fce9ccbfff39aadfb Mon Sep 17 00:00:00 2001 From: komal mahale Date: Tue, 26 May 2026 14:54:29 +0530 Subject: [PATCH 1/2] feat: include combined coverage HTML in docs build and CI --- .github/workflows/deploy_docs.yml | 8 ++++++++ .github/workflows/tests.yml | 18 ++++++++++++++++++ 2 files changed, 26 insertions(+) diff --git a/.github/workflows/deploy_docs.yml b/.github/workflows/deploy_docs.yml index 0424bd8e..055c3651 100644 --- a/.github/workflows/deploy_docs.yml +++ b/.github/workflows/deploy_docs.yml @@ -63,6 +63,8 @@ jobs: fi - name: Build Sphinx documentation run: bazel build //bazel/rules/rules_score:rules_score_doc + - name: Generate combined coverage report + run: bazel run //coverage:combined_report -- --out-dir coverage-html - name: Prepare documentation output run: | BAZEL_BIN="$(bazel info bazel-bin)" @@ -77,6 +79,12 @@ jobs: cp -r "${HTML_DIR}/." docs_output/ chmod -R u+w docs_output/ + # Embed the combined coverage report at docs_output/coverage/ + if [[ -d coverage-html ]]; then + mkdir -p docs_output/coverage + cp -r coverage-html/. docs_output/coverage/ + fi + # Prevent Jekyll from ignoring _static directories touch docs_output/.nojekyll diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 7f33e06a..85a77b3c 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -57,3 +57,21 @@ jobs: - name: Ensure correct dependency resolution run: | bazel mod deps --lockfile_mode=update + coverage: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v6.0.2 + - name: Setup Bazel with cache + uses: bazel-contrib/setup-bazel@0.19.0 + with: + disk-cache: true + repository-cache: true + bazelisk-cache: true + - name: Generate combined coverage report + run: bazel run //coverage:combined_report -- --out-dir coverage-html + - name: Upload coverage report artifact + uses: actions/upload-artifact@v4 + with: + name: coverage-report + path: coverage-html/ From 2e550e40b4be3be9ea7429af61e222ce177db681 Mon Sep 17 00:00:00 2001 From: komal mahale Date: Tue, 26 May 2026 15:31:16 +0530 Subject: [PATCH 2/2] fix: install lcov system dep for coverage report in CI --- .github/workflows/deploy_docs.yml | 2 +- .github/workflows/tests.yml | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy_docs.yml b/.github/workflows/deploy_docs.yml index 055c3651..a86e4d2c 100644 --- a/.github/workflows/deploy_docs.yml +++ b/.github/workflows/deploy_docs.yml @@ -46,7 +46,7 @@ jobs: - name: Install system dependencies run: | sudo apt-get update - sudo apt-get install -y pkg-config libcairo2-dev + sudo apt-get install -y pkg-config libcairo2-dev lcov - name: Determine version id: version run: | diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 85a77b3c..8904e2d9 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -68,6 +68,10 @@ jobs: disk-cache: true repository-cache: true bazelisk-cache: true + - name: Install lcov + run: | + sudo apt-get update + sudo apt-get install -y lcov - name: Generate combined coverage report run: bazel run //coverage:combined_report -- --out-dir coverage-html - name: Upload coverage report artifact