diff --git a/Makefile b/Makefile index 75b1b1c..9a61cd1 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ quality: test: go test -coverprofile=coverage -# go tool cover -func=coverage | grep total | cut -d$$'\t' -f6 | cut -d'.' -f1 + go run main.go -coverage $$(go tool cover -func=coverage | grep total | cut -d$$'\t' -f6 | cut -d'.' -f1) > coverage.svg build: GOOS=darwin GOARCH=386 go build -o covbadger-darwin diff --git a/README.md b/README.md index da7fd19..0f13df9 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # covbadger +![Coverage](https://rawgit.com/imsky/covbadger/master/coverage.svg) + `covbadger` generates code coverage badges from Cobertura-compatible XML coverage reports. ## Compatibility diff --git a/coverage.svg b/coverage.svg new file mode 100644 index 0000000..d9c75bc --- /dev/null +++ b/coverage.svg @@ -0,0 +1,18 @@ + + 100 + Generated with covbadger (https://github.com/imsky/covbadger) + + + + + + + + + + coverage + coverage + 100% + 100% + +