rhi

Coordinated trade for connected markets
git clone https://radroots.dev/git/rhi.git
Log | Files | Refs | README | LICENSE

commit 5aed5c39024716b9313f116ae31f50874900854a
parent ce5b83d1422015dfd22933171b58b24644712057
Author: triesap <tyson@radroots.org>
Date:   Tue,  3 Mar 2026 21:32:49 +0000

build: move coverage flow to make and remove scripts just

- add makefile coverage report and coverage gate targets
- update readme coverage commands to use make
- remove scripts just coverage and dev helper scripts
- keep runtime just recipes focused on dev and log reset

Diffstat:
AMakefile | 19+++++++++++++++++++
Dscripts/just/coverage_gate.sh | 15---------------
Dscripts/just/coverage_report.sh | 20--------------------
Dscripts/just/dev.sh | 6------
Dscripts/just/log_reset.sh | 5-----
5 files changed, 19 insertions(+), 46 deletions(-)

diff --git a/Makefile b/Makefile @@ -0,0 +1,19 @@ +COVERAGE_OUTPUT_DIR := target/coverage +COVERAGE_SUMMARY := $(COVERAGE_OUTPUT_DIR)/summary.json +COVERAGE_LCOV := $(COVERAGE_OUTPUT_DIR)/lcov.info +COVERAGE_THRESHOLDS := contract/coverage/thresholds.toml + +.PHONY: coverage-report coverage-gate + +coverage-report: + mkdir -p $(COVERAGE_OUTPUT_DIR) + cargo +nightly llvm-cov clean --workspace + cargo +nightly llvm-cov --workspace --all-features --branch --no-report + cargo +nightly llvm-cov report --json --summary-only --output-path $(COVERAGE_SUMMARY) + cargo +nightly llvm-cov report --lcov --output-path $(COVERAGE_LCOV) + cargo +nightly llvm-cov report --summary-only + @echo "coverage summary: $(COVERAGE_SUMMARY)" + @echo "coverage lcov: $(COVERAGE_LCOV)" + +coverage-gate: coverage-report + python3 scripts/ci/verify_coverage.py --thresholds $(COVERAGE_THRESHOLDS) --summary $(COVERAGE_SUMMARY) --lcov $(COVERAGE_LCOV) diff --git a/scripts/just/coverage_gate.sh b/scripts/just/coverage_gate.sh @@ -1,15 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" -repo_root="$(cd "${script_dir}/../.." && pwd)" -summary_path="${repo_root}/target/coverage/summary.json" -lcov_path="${repo_root}/target/coverage/lcov.info" -thresholds_path="${repo_root}/contract/coverage/thresholds.toml" - -"${script_dir}/coverage_report.sh" - -python3 "${repo_root}/scripts/ci/verify_coverage.py" \ - --thresholds "${thresholds_path}" \ - --summary "${summary_path}" \ - --lcov "${lcov_path}" diff --git a/scripts/just/coverage_report.sh b/scripts/just/coverage_report.sh @@ -1,20 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" -repo_root="$(cd "${script_dir}/../.." && pwd)" -output_dir="${repo_root}/target/coverage" -summary_path="${output_dir}/summary.json" -lcov_path="${output_dir}/lcov.info" - -mkdir -p "${output_dir}" -cd "${repo_root}" - -cargo +nightly llvm-cov clean --workspace -cargo +nightly llvm-cov --workspace --all-features --branch --no-report -cargo +nightly llvm-cov report --json --summary-only --output-path "${summary_path}" -cargo +nightly llvm-cov report --lcov --output-path "${lcov_path}" -cargo +nightly llvm-cov report --summary-only - -echo "coverage summary: ${summary_path}" -echo "coverage lcov: ${lcov_path}" diff --git a/scripts/just/dev.sh b/scripts/just/dev.sh @@ -1,6 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -log_dir="${1:?missing log dir}" - -RADROOTS_LOG_DIR="${log_dir}" cargo run -- --config config.dev.toml --identity identity.json --allow-generate-identity diff --git a/scripts/just/log_reset.sh b/scripts/just/log_reset.sh @@ -1,5 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -log_dir="${1:?missing log dir}" -rm -rf "${log_dir}"/*