From c2c97c3405ba10d1093a263826769ca15a34f205 Mon Sep 17 00:00:00 2001 From: Filipe Constantinov Menezes Date: Thu, 23 Jul 2020 17:53:31 +0100 Subject: [PATCH] Add coveralls (#16) --- .github/workflows/go.yml | 9 ++++++++- README.md | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index d31e87f..8896f61 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -34,4 +34,11 @@ jobs: run: go build -v . - name: Test - run: go test -v . + run: go test -v -race -covermode atomic -coverprofile=profile.cov . + + - name: Send coverage + env: + COVERALLS_TOKEN: ${{ secrets.COVERALLS_TOKEN }} + run: | + go get github.com/mattn/goveralls + $(go env GOPATH)/bin/goveralls -repotoken $COVERALLS_TOKEN -coverprofile=profile.cov diff --git a/README.md b/README.md index 12cb070..150deab 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ [![Go](https://github.com/fmenezes/codeowners/workflows/Go/badge.svg)](https://github.com/fmenezes/codeowners/actions?query=branch%3Amaster) [![Go Report Card](https://goreportcard.com/badge/github.com/fmenezes/codeowners)](https://goreportcard.com/report/github.com/fmenezes/codeowners) +[![Coverage](https://coveralls.io/repos/github/fmenezes/codeowners/badge.svg?branch=master)](https://coveralls.io/github/fmenezes/codeowners?branch=master) # CODEOWNERS Decoder