mirror of
https://github.com/kuhyx/utils.git
synced 2026-11-10 19:47:38 +01:00
Some checks are pending
crdt_sync_dart tests / test (push) Waiting to run
crdt_sync_flutter tests / test (push) Waiting to run
crdt-sync pre-commit / pre-commit (push) Waiting to run
crdt-sync tests / test (push) Waiting to run
dependency freshness / dependencies on newest stable (push) Waiting to run
design_system tests / test (push) Waiting to run
file length / file-length (push) Waiting to run
freedays pre-commit / pre-commit (push) Waiting to run
freedays tests / test (push) Waiting to run
gatelock pre-commit / pre-commit (push) Waiting to run
gatelock tests / test (push) Waiting to run
github_device_auth tests / test (push) Waiting to run
md-naming / markdown naming convention (push) Waiting to run
music_theory tests / test (push) Waiting to run
palette drift / palette (push) Waiting to run
shared gate tests / gate unit tests (push) Waiting to run
sync_settings_ui tests / test (push) Waiting to run
web_ui tests / test (push) Waiting to run
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AwtowrowDXx6ccmWVPkCaF
33 lines
1.1 KiB
Bash
Executable File
33 lines
1.1 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# ============================================================================
|
|
# Fail if lcov line coverage drops below a threshold.
|
|
#
|
|
# Thin delegate to the shared gate in ~/src/utils/scripts, which owns the parsing
|
|
# and the threshold comparison. This file used to be a byte-identical copy of
|
|
# that logic; three such copies existed, which is how one package's idea of
|
|
# "covered" drifts from every other package's.
|
|
#
|
|
# Usage: check_coverage.sh <lcov.info> <min_percent>
|
|
# ============================================================================
|
|
|
|
set -euo pipefail
|
|
|
|
# Repo-relative, resolved from this script's own location: an absolute
|
|
# /home/... path exits 127 on an Actions runner.
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
readonly SCRIPT_DIR
|
|
readonly SHARED_GATE="${SCRIPT_DIR}/../../scripts/check_coverage.sh"
|
|
|
|
main() {
|
|
if [[ ! -f "$SHARED_GATE" ]]; then
|
|
echo "Error: shared coverage gate not found at $SHARED_GATE" >&2
|
|
echo " It lives in the utils repo at scripts/check_coverage.sh." >&2
|
|
exit 1
|
|
fi
|
|
|
|
exec bash "$SHARED_GATE" "$@"
|
|
}
|
|
|
|
main "$@"
|