ci: fix coverage flag parsing for Linux shell compatibility
continuous-integration/drone/push Build is failing Details

This commit is contained in:
Stefan Goppelt 2026-03-29 15:45:18 +02:00
parent 6ca2c4d25f
commit 0e150f0ba9
1 changed files with 2 additions and 2 deletions

View File

@ -9,7 +9,7 @@ steps:
- go get ./... - go get ./...
- go vet ./... - go vet ./...
- mkdir -p .build - mkdir -p .build
- go test -v -coverprofile=.build/coverage.out ./... - go test -v -coverprofile .build/coverage.out ./...
- go tool cover -func=.build/coverage.out | tee .build/coverage.txt | awk '/^total:/ { gsub("%", "", $3); if ($3 + 0 < 80) { printf("Coverage %.1f%% is below 80%%\n", $3); exit 1 } }' - go tool cover -func .build/coverage.out | tee .build/coverage.txt | awk '/^total:/ { gsub("%", "", $3); if ($3 + 0 < 80) { printf("Coverage %.1f%% is below 80%%\n", $3); exit 1 } }'
- go install golang.org/x/vuln/cmd/govulncheck@latest - go install golang.org/x/vuln/cmd/govulncheck@latest
- govulncheck -json ./... > vulncheck.json - govulncheck -json ./... > vulncheck.json