ci: improve drone test checks and coverage reporting
continuous-integration/drone/push Build is failing Details

This commit is contained in:
Stefan Goppelt 2026-03-29 15:37:35 +02:00
parent d01242ae7c
commit 6ca2c4d25f
2 changed files with 5 additions and 3 deletions

View File

@ -7,6 +7,9 @@ steps:
image: golang:1.25.8 image: golang:1.25.8
commands: commands:
- go get ./... - go get ./...
- go test ./... - go vet ./...
- mkdir -p .build
- 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 install golang.org/x/vuln/cmd/govulncheck@latest - go install golang.org/x/vuln/cmd/govulncheck@latest
- govulncheck -v -json ./... > vulncheck.json - govulncheck -json ./... > vulncheck.json

View File

@ -1 +0,0 @@
mode: set