From 65f507f36afc7ca044eefed6039f0c80ca1f0fc8 Mon Sep 17 00:00:00 2001 From: Markus Pesch Date: Wed, 29 Oct 2025 22:24:05 +0100 Subject: [PATCH] fix(ci): define threshold as var --- .gitea/workflows/golang-tests.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/golang-tests.yaml b/.gitea/workflows/golang-tests.yaml index c02f475..1791a2c 100644 --- a/.gitea/workflows/golang-tests.yaml +++ b/.gitea/workflows/golang-tests.yaml @@ -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