Files
2026-03-27 17:55:57 +08:00

11 lines
249 B
Bash
Executable File

#!/bin/sh
set -eu
ROOT="$(CDPATH= cd -- "$(dirname -- "$0")/../.." && pwd)"
PROFILE="${1:-$ROOT/coverage.out}"
cd "$ROOT"
go test -coverprofile="$PROFILE" ./...
go tool cover -func="$PROFILE" | tail -n 1
printf 'coverage profile: %s\n' "$PROFILE"