fix(ci): define threshold as var
All checks were successful
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-amd64) (push) Successful in 10s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-arm64) (push) Successful in 43s
Run Golang tests / Run unit tests (stable, ubuntu-latest-amd64) (push) Successful in 29s
Lint Markdown files / Run markdown linter (push) Successful in 30s
Run Golang tests / Run unit tests (stable, ubuntu-latest-arm64) (push) Successful in 54s

This commit is contained in:
2025-10-29 22:24:05 +01:00
parent 7d8915925f
commit 65f507f36a

View File

@@ -48,9 +48,10 @@ jobs:
echo "Total coverage: ${coverage}%"
- name: Fail if coverage is to low
run: |
threshold=50
total_coverage=${{ steps.coverage.outputs.total_coverage }}
if (( ${total_coverage%.*} < 50 )); then
echo "ERROR: Coverage (${total_coverage}%) is below the threshold (50%)." 1>&2
if (( ${total_coverage%.*} < ${threshold} )); then
echo "ERROR: Coverage (${total_coverage}%) is below the threshold (${threshold}%)." 1>&2
exit 1
fi