Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] add code coverage report for commons and memory modules #1574

Merged
merged 11 commits into from
Nov 2, 2023
Merged
6 changes: 6 additions & 0 deletions .github/workflows/CI-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,12 @@ jobs:
./gradlew integTest -Dtests.rest.cluster=localhost:9200 -Dtests.cluster=localhost:9200 -Dtests.clustername="docker-cluster"
fi

- name: Upload Coverage Report
uses: codecov/codecov-action@v3
with:
flags: ml-commons
token: ${{ secrets.CODECOV_TOKEN }}

Build-ml-windows:
strategy:
matrix:
Expand Down
4 changes: 3 additions & 1 deletion common/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ lombok {

jacocoTestReport {
reports {
html.required = true
xml.getRequired().set(true)
csv.getRequired().set(false)
html.getRequired().set(true)
}

dependsOn test
Expand Down
22 changes: 8 additions & 14 deletions memory/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -46,37 +46,31 @@ test {

jacocoTestReport {
reports {
html.required = true
html.outputLocation = layout.buildDirectory.dir('jacocoHtml')
xml.getRequired().set(true)
csv.getRequired().set(false)
html.getRequired().set(true)
}

dependsOn test
}

List<String> jacocoExclusions = []

jacocoTestCoverageVerification {
violationRules {
rule {
element = 'CLASS'
excludes = jacocoExclusions
limit {
counter = 'BRANCH'
minimum = 0.7 //TODO: change this value to 0.7
counter = 'LINE'
minimum = 0.7 //TODO: increase coverage to 0.8
}
}
rule {
element = 'CLASS'
excludes = jacocoExclusions
limit {
counter = 'LINE'
value = 'COVEREDRATIO'
minimum = 0.8 //TODO: change this value to 0.8
counter = 'BRANCH'
minimum = 0.8 //TODO: increase coverage to 0.9
}
}
}
dependsOn jacocoTestReport
}
check.dependsOn jacocoTestCoverageVerification

spotless {
java {
Expand Down
Loading