Skip to content

Commit

Permalink
github: add code coverage with codecov.io (#6676)
Browse files Browse the repository at this point in the history
  • Loading branch information
arvindbr8 authored Oct 4, 2023
1 parent 93dbc05 commit 39972fd
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
coverage:
status:
patch:
default:
target: "80"
project:
default:
target: auto
threshold: 1
ignore:
- "test/"
- "benchmark/"
- "internal/testutils"
- ".*.pb.go"
comment:
layout: "header"
19 changes: 19 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: codecov
on: [push, pull_request]
jobs:
upload:
runs-on: ubuntu-latest
steps:
- name: Install checkout
uses: actions/checkout@v4

- name: Install checkout
uses: actions/setup-go@v4
with:
go-version: "stable"

- name: Run coverage
run: go test -coverprofile=coverage.out -coverpkg=./... ./...

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
[![Build Status](https://travis-ci.org/grpc/grpc-go.svg)](https://travis-ci.org/grpc/grpc-go)
[![GoDoc](https://pkg.go.dev/badge/google.golang.org/grpc)][API]
[![GoReportCard](https://goreportcard.com/badge/grpc/grpc-go)](https://goreportcard.com/report/github.com/grpc/grpc-go)
[![codecov](https://codecov.io/gh/{{REPOSITORY}}/branch/main/graph/badge.svg)](https://codecov.io/gh/{{REPOSITORY}})

The [Go][] implementation of [gRPC][]: A high performance, open source, general
RPC framework that puts mobile and HTTP/2 first. For more information see the
Expand Down

0 comments on commit 39972fd

Please sign in to comment.