Skip to content

Commit

Permalink
chores: add code cov (#39)
Browse files Browse the repository at this point in the history
Signed-off-by: 佑祎 <zzw261520@alibaba-inc.com>
  • Loading branch information
zwzhang0107 committed Dec 6, 2023
1 parent 5ad88fc commit 991a6e6
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,10 @@ jobs:
- name: ${{ matrix.name }}
run: |
${{ matrix.command }}
- if: matrix.step == 'test'
name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
flags: unittests
file: cover.out
fail_ci_if_error: true
36 changes: 36 additions & 0 deletions codecov.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# https://docs.codecov.com/docs/commit-status
coverage:
status:
project:
# global coverage
default:
target: auto
threshold: 2%
flags:
- unittests
paths:
- "pkg"
if_ci_failed: error
if_no_uploads: error
if_not_found: success
patch:
# diff coverage
default:
target: 70%
flags:
- unittests
paths:
- "pkg"
informational: true
if_ci_failed: ignore
if_no_uploads: success
if_not_found: success

ignore:
- "apis"
- "yarn/client"
- "yarn/apis"
- "**/*_generated.*"

github_checks:
annotations: true

0 comments on commit 991a6e6

Please sign in to comment.