From ebf96c3a6f7c1fb51d12f971d9896556fbea14bc Mon Sep 17 00:00:00 2001 From: Amal Francis Date: Sun, 11 Jun 2023 13:26:02 +0530 Subject: [PATCH] add coverage badge --- .github/workflows/test.yml | 3 +++ .gitignore | 3 ++- Makefile | 2 +- README.md | 1 + 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f004ffd..9bee83c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -16,3 +16,6 @@ jobs: uses: actions/checkout@v2 - name: Test run: make test + - uses: shogo82148/actions-goveralls@v1 + with: + path-to-profile: profile.cov diff --git a/.gitignore b/.gitignore index 7277057..11d922b 100644 --- a/.gitignore +++ b/.gitignore @@ -12,4 +12,5 @@ *.out vendor/ -test.go \ No newline at end of file +test.go +*.cov diff --git a/Makefile b/Makefile index ceb3dcd..af3194a 100644 --- a/Makefile +++ b/Makefile @@ -7,6 +7,6 @@ vet: go vet ./... test: - go test -v ./... + go test -v ./... -coverprofile=profile.cov build: fmt vet test diff --git a/README.md b/README.md index 70067db..32e1581 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,7 @@ gin-statsd ![Build Status](https://github.com/amalfra/gin-statsd/actions/workflows/test.yml/badge.svg?branch=main) [![GoDoc](https://godoc.org/github.com/amalfra/gin-statsd/v3?status.svg)](https://godoc.org/github.com/amalfra/gin-statsd/v3) [![Go Report Card](https://goreportcard.com/badge/github.com/amalfra/gin-statsd/v3)](https://goreportcard.com/report/github.com/amalfra/gin-statsd/v3) +[![Coverage Status](https://coveralls.io/repos/github/amalfra/gin-statsd/badge.svg?branch=main)](https://coveralls.io/github/amalfra/gin-statsd?branch=main) A [Gin](https://github.com/gin-gonic/gin) middleware for reporting to statsd daemon.