From fc375081f954498e48e572b68bbb2ebf1bf2bdb1 Mon Sep 17 00:00:00 2001 From: Abhishek Dwivedi Date: Mon, 29 Apr 2024 11:37:52 +0530 Subject: [PATCH 01/10] FDN-2325: Addition Scoverage --- Jenkinsfile | 5 +++-- build.sbt | 6 ++++++ project/plugins.sbt | 1 + 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 0c97b9b0..6e4ba480 100755 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -78,11 +78,12 @@ pipeline { do sleep 10 done - sbt clean flowLint test scalafmtSbtCheck scalafmtCheck doc + sbt clean coverage flowLint test scalafmtSbtCheck scalafmtCheck doc ''' + sh 'sbt coverageAggregate' } finally { - junit allowEmptyResults: true, testResults: '**/target/test-reports/*.xml' + postSbtReport() } } } diff --git a/build.sbt b/build.sbt index 37d2ff2e..06d62264 100644 --- a/build.sbt +++ b/build.sbt @@ -127,5 +127,11 @@ lazy val commonSettings: Seq[Setting[_]] = Seq( scalacOptions ++= allScalacOptions, credentials += credsToUse, resolvers += "Artifactory" at "https://flow.jfrog.io/flow/libs-release/", + coverageExcludedFiles := ".*\\/api/app/generated\\/.*;.*\\/api/app/db/generated\\/.*;.*\\/generated\\/.*, + coverageDataDir := file("target/scala-2.13"), + coverageHighlighting := true, + coverageFailOnMinimum := true, + coverageMinimumStmtTotal := 35, + coverageMinimumBranchTotal := 35, ) version := "0.8.43" diff --git a/project/plugins.sbt b/project/plugins.sbt index 7b872555..1a0bdbe6 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -25,3 +25,4 @@ ThisBuild / libraryDependencySchemes ++= Seq( ) addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.2") +addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.8") \ No newline at end of file From 5b93e5ba03923a1c0957345da012b79ef136172b Mon Sep 17 00:00:00 2001 From: Abhishek Dwivedi Date: Mon, 29 Apr 2024 11:46:31 +0530 Subject: [PATCH 02/10] FDN-2325: Addition Scoverage --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 06d62264..c8f8e5fa 100644 --- a/build.sbt +++ b/build.sbt @@ -127,7 +127,7 @@ lazy val commonSettings: Seq[Setting[_]] = Seq( scalacOptions ++= allScalacOptions, credentials += credsToUse, resolvers += "Artifactory" at "https://flow.jfrog.io/flow/libs-release/", - coverageExcludedFiles := ".*\\/api/app/generated\\/.*;.*\\/api/app/db/generated\\/.*;.*\\/generated\\/.*, + coverageExcludedFiles := ".*\\/api/app/generated\\/.*;.*\\/api/app/db/generated\\/.*;.*\\/generated\\/.*", coverageDataDir := file("target/scala-2.13"), coverageHighlighting := true, coverageFailOnMinimum := true, From e72f2fcaf0e59be8823d82843fd3765c5ae489ed Mon Sep 17 00:00:00 2001 From: Abhishek Dwivedi Date: Mon, 29 Apr 2024 12:18:07 +0530 Subject: [PATCH 03/10] FDN-2325: Test Scoverage --- build.sbt | 4 ++-- project/plugins.sbt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build.sbt b/build.sbt index c8f8e5fa..bfbd5bf0 100644 --- a/build.sbt +++ b/build.sbt @@ -131,7 +131,7 @@ lazy val commonSettings: Seq[Setting[_]] = Seq( coverageDataDir := file("target/scala-2.13"), coverageHighlighting := true, coverageFailOnMinimum := true, - coverageMinimumStmtTotal := 35, - coverageMinimumBranchTotal := 35, + coverageMinimumStmtTotal := 0, + coverageMinimumBranchTotal := 0, ) version := "0.8.43" diff --git a/project/plugins.sbt b/project/plugins.sbt index 1a0bdbe6..379ab97e 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -25,4 +25,4 @@ ThisBuild / libraryDependencySchemes ++= Seq( ) addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.2") -addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.8") \ No newline at end of file +addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.8") From 5620f7d28d62746bcf9e9467caff0844a1192985 Mon Sep 17 00:00:00 2001 From: Abhishek Dwivedi Date: Mon, 29 Apr 2024 12:23:11 +0530 Subject: [PATCH 04/10] FDN-2325: Updated Scoverage threshold --- build.sbt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.sbt b/build.sbt index bfbd5bf0..f82f9d86 100644 --- a/build.sbt +++ b/build.sbt @@ -131,7 +131,7 @@ lazy val commonSettings: Seq[Setting[_]] = Seq( coverageDataDir := file("target/scala-2.13"), coverageHighlighting := true, coverageFailOnMinimum := true, - coverageMinimumStmtTotal := 0, - coverageMinimumBranchTotal := 0, + coverageMinimumStmtTotal := 30, + coverageMinimumBranchTotal := 30, ) version := "0.8.43" From 68352ab82d8ebe31f351bdef55b6ddbbf008edf6 Mon Sep 17 00:00:00 2001 From: Abhishek Dwivedi Date: Mon, 29 Apr 2024 12:28:52 +0530 Subject: [PATCH 05/10] FDN-2325: Updated Scoverage threshold --- build.sbt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.sbt b/build.sbt index f82f9d86..bfbd5bf0 100644 --- a/build.sbt +++ b/build.sbt @@ -131,7 +131,7 @@ lazy val commonSettings: Seq[Setting[_]] = Seq( coverageDataDir := file("target/scala-2.13"), coverageHighlighting := true, coverageFailOnMinimum := true, - coverageMinimumStmtTotal := 30, - coverageMinimumBranchTotal := 30, + coverageMinimumStmtTotal := 0, + coverageMinimumBranchTotal := 0, ) version := "0.8.43" From 849d46046d2188eddc4c72df1b2345a173c0dc46 Mon Sep 17 00:00:00 2001 From: Abhishek Dwivedi Date: Mon, 29 Apr 2024 12:40:50 +0530 Subject: [PATCH 06/10] FDN-2325: Updated Scoverage threshold test --- build.sbt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.sbt b/build.sbt index bfbd5bf0..0fb15eeb 100644 --- a/build.sbt +++ b/build.sbt @@ -131,7 +131,7 @@ lazy val commonSettings: Seq[Setting[_]] = Seq( coverageDataDir := file("target/scala-2.13"), coverageHighlighting := true, coverageFailOnMinimum := true, - coverageMinimumStmtTotal := 0, - coverageMinimumBranchTotal := 0, + coverageMinimumStmtTotal := 20, + coverageMinimumBranchTotal := 20, ) version := "0.8.43" From 7825a3243ca4efe5a1b5092a94ab83580d256ea5 Mon Sep 17 00:00:00 2001 From: Abhishek Dwivedi Date: Tue, 30 Apr 2024 11:20:13 +0530 Subject: [PATCH 07/10] FDN-2325: Updated build.sbt/jenkins --- Jenkinsfile | 2 +- build.sbt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 6e4ba480..d1d407b8 100755 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -78,8 +78,8 @@ pipeline { do sleep 10 done - sbt clean coverage flowLint test scalafmtSbtCheck scalafmtCheck doc ''' + sh 'sbt clean coverage flowLint test scalafmtSbtCheck scalafmtCheck doc' sh 'sbt coverageAggregate' } finally { diff --git a/build.sbt b/build.sbt index 0fb15eeb..5454fa62 100644 --- a/build.sbt +++ b/build.sbt @@ -127,7 +127,7 @@ lazy val commonSettings: Seq[Setting[_]] = Seq( scalacOptions ++= allScalacOptions, credentials += credsToUse, resolvers += "Artifactory" at "https://flow.jfrog.io/flow/libs-release/", - coverageExcludedFiles := ".*\\/api/app/generated\\/.*;.*\\/api/app/db/generated\\/.*;.*\\/generated\\/.*", + coverageExcludedFiles := ".*\\/*generated*\\/.*", coverageDataDir := file("target/scala-2.13"), coverageHighlighting := true, coverageFailOnMinimum := true, From 80e064f869d897aad08fe4eadd452fab541bfd66 Mon Sep 17 00:00:00 2001 From: Abhishek Dwivedi Date: Tue, 30 Apr 2024 16:46:59 +0530 Subject: [PATCH 08/10] FDN-2325: Updated jenkinsfile for coverage test command --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index d1d407b8..bd56341b 100755 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -79,7 +79,7 @@ pipeline { sleep 10 done ''' - sh 'sbt clean coverage flowLint test scalafmtSbtCheck scalafmtCheck doc' + sh 'sbt clean flowLint coverage test scalafmtSbtCheck scalafmtCheck doc' sh 'sbt coverageAggregate' } finally { From 93910fe2f8bb8db67a5a805ab02851442dd8adaf Mon Sep 17 00:00:00 2001 From: Abhishek Dwivedi <101242704+abhidwivedi2701@users.noreply.github.com> Date: Tue, 30 Apr 2024 18:35:20 +0530 Subject: [PATCH 09/10] Update build.sbt --- build.sbt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.sbt b/build.sbt index 5454fa62..f79870a2 100644 --- a/build.sbt +++ b/build.sbt @@ -131,7 +131,7 @@ lazy val commonSettings: Seq[Setting[_]] = Seq( coverageDataDir := file("target/scala-2.13"), coverageHighlighting := true, coverageFailOnMinimum := true, - coverageMinimumStmtTotal := 20, - coverageMinimumBranchTotal := 20, + coverageMinimumStmtTotal := 35, + coverageMinimumBranchTotal := 35, ) version := "0.8.43" From 03c931ca5dea07a62b882c791917b157b13af81d Mon Sep 17 00:00:00 2001 From: Abhishek Dwivedi Date: Tue, 30 Apr 2024 20:20:16 +0530 Subject: [PATCH 10/10] FDN-2325: Updated scoverage thresholds --- build.sbt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.sbt b/build.sbt index f79870a2..d7a4ad04 100644 --- a/build.sbt +++ b/build.sbt @@ -131,7 +131,7 @@ lazy val commonSettings: Seq[Setting[_]] = Seq( coverageDataDir := file("target/scala-2.13"), coverageHighlighting := true, coverageFailOnMinimum := true, - coverageMinimumStmtTotal := 35, - coverageMinimumBranchTotal := 35, + coverageMinimumStmtTotal := 36, + coverageMinimumBranchTotal := 36, ) version := "0.8.43"