Skip to content

Commit

Permalink
Unit Test Coverage Threshold (opensearch-project#101)
Browse files Browse the repository at this point in the history
* Setting unit test coverage target to 80% with a 2% threshold. Builds will fail if coverage hits 78%.
* Adding pull request stats action to test.

Signed-off-by: Mark Cohen <[email protected]>
Co-authored-by: Mark Cohen <[email protected]>
Signed-off-by: Mingshi Liu <[email protected]>
  • Loading branch information
2 people authored and mingshl committed Jan 9, 2023
1 parent 09236bf commit 83318cb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions .github/.codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ coverage:
status:
project:
default:
# https://docs.codecov.com/docs/commit-status#target
target: auto # coverage must be equal or above the previous commit
target: 80%%
threshold: 2%

3 changes: 2 additions & 1 deletion .github/workflows/stats.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ name: Pull Request Stats
on:
pull_request:
types: [opened]
workflow_dispatch:

jobs:
stats:
runs-on: ubuntu-latest
steps:
- name: Run pull request stats
uses: flowwer-dev/pull-request-stats@master
uses: flowwer-dev/pull-request-stats@master

0 comments on commit 83318cb

Please sign in to comment.