From f532b05e7280a82aa844913d0d95d186b0db6e42 Mon Sep 17 00:00:00 2001 From: Stephen Adamson Date: Fri, 10 Jul 2026 09:44:47 +0100 Subject: [PATCH] ci: set coverage threshold to 100%, govulncheck gated behind go-build MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Coverage check now requires 100% (fail on any uncovered line). govulncheck (vulns) now has needs: [go-build], placing it in the gate block alongside vet/lint/staticcheck/gosec. Test and race already depended on vulns, so the chain is: go-build → gate jobs (incl vulns) → test+race. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus --- .gitea/workflows/ci.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml index 24d1b95..d5f0898 100644 --- a/.gitea/workflows/ci.yaml +++ b/.gitea/workflows/ci.yaml @@ -347,11 +347,11 @@ jobs: if [ -f coverage.out ]; then COVERAGE=$(go tool cover -func=coverage.out | grep total | awk '{print $3}' | sed 's/%//') echo "Total coverage: $COVERAGE%" - if [ "$(echo "$COVERAGE < 50" | bc)" -eq 1 ]; then - echo "FAIL: Coverage $COVERAGE% is below 50% threshold" + if [ "$(echo "$COVERAGE < 100" | bc)" -eq 1 ]; then + echo "FAIL: Coverage $COVERAGE% is below 100% threshold" exit 1 fi - echo "PASS: Coverage $COVERAGE% meets 50% threshold" + echo "PASS: Coverage $COVERAGE% meets 100% threshold" else echo "No coverage file generated (prod build)" fi @@ -429,6 +429,7 @@ jobs: vulns: name: Go vulnerabilities + needs: [go-build] runs-on: ubuntu-latest defaults: run: