Skip to content

Commit

Permalink
action: update workflow to block low unit test coverage code
Browse files Browse the repository at this point in the history
1. The project's unit test coverage cannot be reduced by more than 0.5%.
2. The unit test coverage of each patch must be higher than 75%.

Signed-off-by: Qinqi Qu <[email protected]>
  • Loading branch information
adamqqqplay committed Apr 28, 2023
1 parent f89d069 commit 689c25c
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
coverage:
status:
project:
default:
enabled: yes
target: auto # auto compares coverage to the previous base commit
# adjust accordingly based on how flaky your tests are
# this allows a 0.5% drop from the previous base commit coverage
threshold: 0.5%
patch:
default:
target: 75% # the required coverage value in each patch

comment:
layout: "reach, diff, flags, files"
behavior: default
require_changes: false # if true: only post the comment if coverage changes

codecov:
require_ci_to_pass: false
notify:
wait_for_ci: false

# When modifying this file, please validate using

# curl -X POST --data-binary @codecov.yml https://codecov.io/validate

0 comments on commit 689c25c

Please sign in to comment.