lib

Core libraries for Radroots
git clone https://radroots.dev/git/lib.git
Log | Files | Refs | README | LICENSE

commit ddbaa7ff721cb0af3b0b3873f823a36d30c778b2
parent b5bde9764d3f0fa8e3c870bdd7f44b9a63b58ce7
Author: triesap <tyson@radroots.org>
Date:   Sun, 22 Feb 2026 03:22:42 +0000

ci: expand workspace coverage reporting for sdk crates


- trigger sdk coverage workflow for any crate changes in the workspace
- enumerate report crates from xtask workspace metadata instead of hardcoded lists
- keep blocking gates strict while allowing report-set collection to continue on failures
- publish per-crate report status alongside summary and blocking gate artifacts

Diffstat:
M.github/workflows/sdk-coverage-ci.yml | 84++++++++++++++++++++++++++++++++++++++++++++++++++++++++-----------------------
1 file changed, 60 insertions(+), 24 deletions(-)

diff --git a/.github/workflows/sdk-coverage-ci.yml b/.github/workflows/sdk-coverage-ci.yml @@ -8,14 +8,7 @@ on: paths: - ".github/workflows/sdk-coverage-ci.yml" - "crates/xtask/**" - - "crates/core/**" - - "crates/types/**" - - "crates/events/**" - - "crates/trade/**" - - "crates/identity/**" - - "crates/tangle-db-schema/**" - - "crates/events-codec/**" - - "crates/events-codec-wasm/**" + - "crates/**" jobs: coverage-report: @@ -38,30 +31,72 @@ jobs: - name: run sdk coverage report set run: | set -euo pipefail - crates=( - xtask - radroots-core - radroots-types - radroots-events - radroots-trade - radroots-identity - radroots-tangle-db-schema - radroots-events-codec - radroots-events-codec-wasm - ) - for crate in "${crates[@]}"; do + mkdir -p target/sdk-coverage + : > target/sdk-coverage/coverage-report-status.txt + cargo run -q -p xtask -- sdk coverage workspace-crates > /tmp/radroots_workspace_coverage_crates.txt + while IFS= read -r crate; do + [ -n "${crate}" ] || continue safe_crate="${crate//-/_}" run_dir="target/sdk-coverage/${safe_crate}" - cargo run -q -p xtask -- sdk coverage run-crate --crate "${crate}" --out "${run_dir}" --test-threads 1 - cargo run -q -p xtask -- sdk coverage report \ + mkdir -p "${run_dir}" + status="ok" + + if ! cargo run -q -p xtask -- sdk coverage run-crate --crate "${crate}" --out "${run_dir}" --test-threads 1; then + status="run-failed" + fi + + if [ "${status}" = "ok" ] && ! cargo run -q -p xtask -- sdk coverage report \ --scope "${crate}" \ --summary "${run_dir}/coverage-summary.json" \ --lcov "${run_dir}/coverage-lcov.info" \ --out "${run_dir}/coverage-gate-summary.json" \ --fail-under-exec-lines 0 \ --fail-under-functions 0 \ - --fail-under-branches 0 - done + --fail-under-branches 0; then + status="report-failed" + fi + + if [ "${status}" != "ok" ]; then + cat > "${run_dir}/coverage-gate-summary.json" <<JSON +{ + "scope": "${crate}", + "thresholds": { + "executable_lines": 0, + "functions": 0, + "branches": 0, + "branches_required": false + }, + "measured": { + "executable_lines_percent": 0, + "executable_lines_source": "da", + "functions_percent": 0, + "branches_percent": null, + "branches_available": false, + "summary_lines_percent": 0, + "summary_regions_percent": 0 + }, + "counts": { + "executable_lines": { + "covered": 0, + "total": 0 + }, + "branches": { + "covered": 0, + "total": 0 + } + }, + "result": { + "pass": false, + "fail_reasons": [ + "${status}" + ] + } +} +JSON + fi + + echo "${crate}:${status}" >> target/sdk-coverage/coverage-report-status.txt + done < /tmp/radroots_workspace_coverage_crates.txt - name: enforce blocking required coverage gates run: | @@ -90,3 +125,4 @@ jobs: path: | target/sdk-coverage/**/coverage-gate-summary.json target/sdk-coverage/**/coverage-gate-blocking.json + target/sdk-coverage/coverage-report-status.txt