fix(ci): add coverage check
All checks were successful
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-amd64) (push) Successful in 9s
Lint Markdown files / Run markdown linter (push) Successful in 3s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-arm64) (push) Successful in 32s

This commit is contained in:
2025-10-28 20:55:42 +01:00
parent 5c1be0a9ce
commit 39e7787057

View File

@@ -40,3 +40,17 @@
# - env:
# GOPROXY: ${{ vars.GOPROXY }}
# run: make test/unit
# - id: coverage
# name: Check coverage
# run: |
# coverage="$(make test/coverage | grep total | awk '{ print substr($3, 1, length($3)-1); }')"
# echo "total_coverage=$coverage" >> $GITHUB_OUTPUT
# echo "Total coverage: ${coverage}%"
# - name: Fail if coverage is to low
# run: |
# total_coverage=${{ steps.coverage.outputs.total_coverage }}
#
# if (( ${total_coverage%.*} < 50 )); then
# echo "ERROR: Coverage (${total_coverage}%) is below the threshold (50%)." 1>&2
# exit 1
# fi