Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,11 +131,13 @@ jobs:

- name: Coverage gate
working-directory: framework/cli
# -coverpkg=./... instruments every package so cross-package execution
# (e.g. cmd integration tests exercising internal/*) is properly attributed.
run: |
go test -coverprofile=coverage.out ./... 2>/dev/null
go test -coverpkg=./... -coverprofile=coverage.out ./...
pct=$(go tool cover -func=coverage.out | awk '/^total/{gsub(/%/,"",$3); print int($3)}')
echo "Coverage: ${pct}%"
if [ "${pct}" -lt 70 ]; then echo "Coverage ${pct}% below 70% threshold" && exit 1; fi
if [ "${pct}" -lt 35 ]; then echo "Coverage ${pct}% below 35% threshold" && exit 1; fi

- name: Build
working-directory: framework/cli
Expand Down