cover on push (#78)

* cover on push

* newline

* badge

* test cover options

* exluded examples

* exclude cleanup
This commit is contained in:
Mark Chmarny 2020-09-18 09:26:35 -07:00 committed by GitHub
parent 77ee60225a
commit ab43a43e98
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 16 additions and 3 deletions

4
.codecov.yaml Normal file
View File

@ -0,0 +1,4 @@
ignore:
- "dapr/proto/**"
- "example/**"

View File

@ -36,8 +36,11 @@ jobs:
go mod vendor
- name: Test
run: go test -v -count=1 -race ./...
run: go test -v -count=1 -race -coverprofile=coverage.txt -covermode=atomic ./...
- name: Cover
uses: codecov/codecov-action@v1
- name: Lint
uses: golangci/golangci-lint-action@v1
with:

1
.gitignore vendored
View File

@ -17,3 +17,4 @@ vendor
# docs
golang.org
coverage.txt

View File

@ -9,7 +9,12 @@ tidy: ## Updates the go modules
go mod tidy
test: mod ## Tests the entire project
go test -count=1 -race ./...
go test -v \
-count=1 \
-race \
-coverprofile=coverage.txt \
-covermode=atomic \
./...
cover: mod ## Displays test coverage in the client and service packages
go test -coverprofile=cover-client.out ./client && go tool cover -html=cover-client.out

View File

@ -2,7 +2,7 @@
Client library to help you build Dapr application in go. This client supports all public [Dapr APIs](https://github.com/dapr/docs/tree/master/reference/api) while focusing on idiomatic go experience and developer productivity.
[![Test](https://github.com/dapr/go-sdk/workflows/Test/badge.svg)](https://github.com/dapr/go-sdk/actions?query=workflow%3ATest) [![Release](https://github.com/dapr/go-sdk/workflows/Release/badge.svg)](https://github.com/dapr/go-sdk/actions?query=workflow%3ARelease) [![Go Report Card](https://goreportcard.com/badge/github.com/dapr/go-sdk)](https://goreportcard.com/report/github.com/dapr/go-sdk) ![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/dapr/go-sdk)
[![Test](https://github.com/dapr/go-sdk/workflows/Test/badge.svg)](https://github.com/dapr/go-sdk/actions?query=workflow%3ATest) [![Release](https://github.com/dapr/go-sdk/workflows/Release/badge.svg)](https://github.com/dapr/go-sdk/actions?query=workflow%3ARelease) [![Go Report Card](https://goreportcard.com/badge/github.com/dapr/go-sdk)](https://goreportcard.com/report/github.com/dapr/go-sdk) ![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/dapr/go-sdk) [![codecov](https://codecov.io/gh/dapr/go-sdk/branch/master/graph/badge.svg)](https://codecov.io/gh/dapr/go-sdk)
## Usage