Skip to content

Commit

Permalink
feat: add badges and covermode in readme
Browse files Browse the repository at this point in the history
  • Loading branch information
arifmahmudrana committed Aug 8, 2021
1 parent c91bf34 commit c74e137
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
## <div align="center">[![Tag and release](https://github.com/arifmahmudrana/rand-str/actions/workflows/test-tag-and-release.yaml/badge.svg)](https://github.com/arifmahmudrana/rand-str/actions/workflows/test-tag-and-release.yaml) [![Go Report Card](https://goreportcard.com/badge/github.com/arifmahmudrana/rand-str)](https://goreportcard.com/report/github.com/arifmahmudrana/rand-str) [![codecov](https://codecov.io/gh/arifmahmudrana/rand-str/branch/main/graph/badge.svg)](https://codecov.io/gh/arifmahmudrana/rand-str)</div>

Random string generator
================

Expand Down Expand Up @@ -33,11 +35,11 @@ go test -v -race ./...

To get test coverage
```sh
go test -v -race -coverprofile=/tmp/go-cover.`basename $(pwd)`.out ./... && go tool cover -func=/tmp/go-cover.`basename $(pwd)`.out && unlink /tmp/go-cover.`basename $(pwd)`.out
go test -v -race -coverprofile=/tmp/go-cover.`basename $(pwd)`.out -covermode=atomic ./... && go tool cover -func=/tmp/go-cover.`basename $(pwd)`.out && unlink /tmp/go-cover.`basename $(pwd)`.out
```
Or
```sh
go test -v -race -coverprofile=/tmp/go-cover.`basename $(pwd)`.out ./... && go tool cover -html=/tmp/go-cover.`basename $(pwd)`.out && unlink /tmp/go-cover.`basename $(pwd)`.out
go test -v -race -coverprofile=/tmp/go-cover.`basename $(pwd)`.out -covermode=atomic ./... && go tool cover -html=/tmp/go-cover.`basename $(pwd)`.out && unlink /tmp/go-cover.`basename $(pwd)`.out
```

## Build
Expand Down

0 comments on commit c74e137

Please sign in to comment.