From 6d521e59891a126981838df16c7015902bbd8562 Mon Sep 17 00:00:00 2001 From: TrungBui59 Date: Mon, 30 Oct 2023 10:15:21 -0400 Subject: [PATCH 1/4] Test CI for codecov Signed-off-by: TrungBui59 --- .github/workflows/CI-workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI-workflow.yml b/.github/workflows/CI-workflow.yml index 8472803dfc..229feb2daa 100644 --- a/.github/workflows/CI-workflow.yml +++ b/.github/workflows/CI-workflow.yml @@ -108,7 +108,7 @@ jobs: fi - name: Upload Coverage Report - uses: codecov/codecov-action@v1 + uses: codecov/codecov-action@v3 with: flags: ml-commons token: ${{ secrets.CODECOV_TOKEN }} From 5c6e9c0161e10e920f0b968cdb4ef4132e8ed229 Mon Sep 17 00:00:00 2001 From: TrungBui59 Date: Mon, 30 Oct 2023 17:08:03 -0400 Subject: [PATCH 2/4] Change the gradle files for codecov Signed-off-by: TrungBui59 --- common/build.gradle | 1 + memory/build.gradle | 3 +++ 2 files changed, 4 insertions(+) diff --git a/common/build.gradle b/common/build.gradle index 474ad9db65..03031d121c 100644 --- a/common/build.gradle +++ b/common/build.gradle @@ -30,6 +30,7 @@ lombok { jacocoTestReport { reports { html.required = true + xml.required = true } dependsOn test diff --git a/memory/build.gradle b/memory/build.gradle index 3a481507fb..cbd9c3e973 100644 --- a/memory/build.gradle +++ b/memory/build.gradle @@ -47,6 +47,7 @@ test { jacocoTestReport { reports { html.required = true + xml.required = true html.outputLocation = layout.buildDirectory.dir('jacocoHtml') } @@ -78,6 +79,8 @@ jacocoTestCoverageVerification { dependsOn jacocoTestReport } +check.dependsOn jacocoTestCoverageVerification + spotless { java { removeUnusedImports() From 8a5f43c77ceeba9635dc21e46ba63c873967a7e6 Mon Sep 17 00:00:00 2001 From: TrungBui59 Date: Tue, 31 Oct 2023 05:19:52 -0400 Subject: [PATCH 3/4] Fixing gradle file to support for codecov Signed-off-by: TrungBui59 --- common/build.gradle | 5 +++-- memory/build.gradle | 7 ++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/common/build.gradle b/common/build.gradle index 03031d121c..c664aa1f47 100644 --- a/common/build.gradle +++ b/common/build.gradle @@ -29,8 +29,9 @@ lombok { jacocoTestReport { reports { - html.required = true - xml.required = true + xml.getRequired().set(true) + csv.getRequired().set(false) + html.getRequired().set(true) } dependsOn test diff --git a/memory/build.gradle b/memory/build.gradle index cbd9c3e973..7985bccbcb 100644 --- a/memory/build.gradle +++ b/memory/build.gradle @@ -46,14 +46,15 @@ test { jacocoTestReport { reports { - html.required = true - xml.required = true - html.outputLocation = layout.buildDirectory.dir('jacocoHtml') + xml.getRequired().set(true) + csv.getRequired().set(false) + html.getRequired().set(true) } dependsOn test } + List jacocoExclusions = [] jacocoTestCoverageVerification { From 87e26ec4954fbd7b27950e5810e53739dc2283a9 Mon Sep 17 00:00:00 2001 From: TrungBui59 Date: Thu, 2 Nov 2023 16:44:47 -0400 Subject: [PATCH 4/4] change the todo Signed-off-by: TrungBui59 --- memory/build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/memory/build.gradle b/memory/build.gradle index b3a4192ba2..dd7a7fec49 100644 --- a/memory/build.gradle +++ b/memory/build.gradle @@ -60,11 +60,11 @@ jacocoTestCoverageVerification { rule { limit { counter = 'LINE' - minimum = 0.7 //TODO: increase coverage to 0.7 + minimum = 0.7 //TODO: increase coverage to 0.8 } limit { counter = 'BRANCH' - minimum = 0.8 //TODO: increase coverage to 0.8 + minimum = 0.8 //TODO: increase coverage to 0.9 } } }