From 363e5a6a31448671caed4253c01a688f05c666ab Mon Sep 17 00:00:00 2001 From: jichangjun Date: Sat, 23 May 2020 16:33:49 +0800 Subject: [PATCH 1/2] upload coverage report to codecov --- .github/workflows/ut_check.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ut_check.yml b/.github/workflows/ut_check.yml index 577f2f5..8021729 100644 --- a/.github/workflows/ut_check.yml +++ b/.github/workflows/ut_check.yml @@ -26,4 +26,5 @@ jobs: - name: Go test run: | export DEFAULT_EXCEPT_PKGS=e2e - go test -p 1 -cover $(go list ./... | grep -v -E $DEFAULT_EXCEPT_PKGS) + go test -p 1 -race -coverprofile=coverage.txt $(go list ./... | grep -v -E $DEFAULT_EXCEPT_PKGS) + bash <(curl -s https://codecov.io/bash) From aad0c00c78c017d42b7c0eaf5256b907b754f712 Mon Sep 17 00:00:00 2001 From: jichangjun Date: Sat, 23 May 2020 16:44:13 +0800 Subject: [PATCH 2/2] add codecov into README doc --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index c4632f6..1158a45 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ ![](https://github.com/qiniu/goc/workflows/ut-check/badge.svg) ![](https://github.com/qiniu/goc/workflows/style-check/badge.svg) ![](https://github.com/qiniu/goc/workflows/e2e%20test/badge.svg) +[![codecov](https://codecov.io/gh/qiniu/goc/branch/master/graph/badge.svg)](https://codecov.io/gh/qiniu/goc) A Comprehensive Coverage Testing System for The Go Programming Language > **Note:**