Skip to content

Commit

Permalink
Code coverage (opensearch-project#104)
Browse files Browse the repository at this point in the history
* issue opensearch-project#28

Signed-off-by: mloufra <[email protected]>

* Update the lastest coomit

Signed-off-by: mloufra <[email protected]>

* Rename the method and fix the conflict

Signed-off-by: mloufra <[email protected]>

* fix merge conflict

Signed-off-by: mloufra <[email protected]>

* Add code coverage report

Signed-off-by: mloufra <[email protected]>

* Rebase the lastest commit

Signed-off-by: mloufra <[email protected]>

* Add code coverage report

Signed-off-by: mloufra <[email protected]>

* delete --coverage

Signed-off-by: mloufra <[email protected]>

Signed-off-by: mloufra <[email protected]>
  • Loading branch information
mloufra authored and kokibas committed Mar 17, 2023
1 parent 23e75b7 commit ac68585
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
coverage:
precision: 2
round: down
range: "70...90"
status:
project:
default:
target: auto # the required coverage value
threshold: 0.2% # the leniency in hitting the target
4 changes: 4 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,7 @@ jobs:
- name: Run Gradle Check
run: |
./gradlew check
- name: Upload Coverage Report
uses: codecov/[email protected]
with:
file: ./build/reports/jacoco/test/jacocoTestReport.xml
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
[![codecov](https://codecov.io/gh/opensearch-project/opensearch-sdk-java/branch/main/graph/badge.svg)](https://codecov.io/gh/opensearch-project/opensearch-sdk-java)

# OpenSearch SDK
- [Introduction](#introduction)
- [Contributing](#contributing)
Expand Down
12 changes: 12 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
plugins {
id 'java'
id "com.diffplug.spotless" version "6.3.0" apply false
id 'jacoco'
}


Expand Down Expand Up @@ -112,4 +113,15 @@ test {
events "passed", "skipped", "failed"
exceptionFormat "full"
}
jacoco {
classDumpDir = file("$buildDir/jacoco/classpathdumps")
}
finalizedBy jacocoTestReport
}

jacocoTestReport {
dependsOn test
reports {
xml.required = true
}
}

0 comments on commit ac68585

Please sign in to comment.