From a4dcfa347a58bb7791dc47b9ca94e93504a35675 Mon Sep 17 00:00:00 2001 From: Luben Karavelov Date: Mon, 2 Oct 2023 20:43:59 +0100 Subject: [PATCH] Disable jacoco coverage There is some conflict with the `sbt-java-module-info` plugin --- .github/workflows/ci.yml | 6 +++--- build.sbt | 8 +++++--- project/plugins.sbt | 2 +- src/test/scala/Zstd.scala | 2 +- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f14f7a4..73ec91a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,7 +26,7 @@ jobs: run: ldd target/classes/${{ matrix.target }}/libzstd-jni-${nativeJniVersion}.so - name: Test - run: ./sbt jacoco + run: ./sbt test - name: Upload coverage uses: codecov/codecov-action@v3 @@ -76,7 +76,7 @@ jobs: - name: Test if: matrix.target_arch == 'x86_64' - run: ./sbt jacoco + run: ./sbt test - name: Upload coverage if: matrix.target_arch == 'x86_64' @@ -123,7 +123,7 @@ jobs: run: ./sbt compile - name: Test - run: ./sbt jacoco + run: ./sbt test - name: Upload coverage uses: codecov/codecov-action@v3 diff --git a/build.sbt b/build.sbt index ee62894..bef9c10 100644 --- a/build.sbt +++ b/build.sbt @@ -6,7 +6,7 @@ version := { scala.io.Source.fromFile("version").getLines.next } -scalaVersion := "2.13.8" +scalaVersion := "2.13.12" enablePlugins(JniPlugin, SbtOsgi, ModuleInfoPlugin) moduleInfo := com.sandinh.javamodule.moduleinfo.JpmsModule( @@ -23,8 +23,8 @@ Test / logBuffered := false Test / parallelExecution := false libraryDependencies ++= Seq( - "org.scalatest" %% "scalatest" % "3.2.13" % "test", - "org.scalatestplus" %% "scalacheck-1-16" % "3.2.13.0" % "test" + "org.scalatest" %% "scalatest" % "3.2.17" % "test", + "org.scalatestplus" %% "scalacheck-1-17" % "3.2.17.0" % "test" ) javacOptions ++= Seq("--release", "6", "-Xlint:unchecked") @@ -213,12 +213,14 @@ OsgiKeys.privatePackage := Seq( OsgiKeys.requireCapability := "osgi.ee;filter:=\"(&(osgi.ee=JavaSE)(version>=1.6))\"" // Jacoco coverage setting +/* jacocoReportSettings := JacocoReportSettings( "Jacoco Coverage Report", None, JacocoThresholds(), Seq(JacocoReportFormats.XML, JacocoReportFormats.HTML), "utf-8") +*/ // Android .aar val aarTask = taskKey[File]("aar Task") diff --git a/project/plugins.sbt b/project/plugins.sbt index 906102e..c947cef 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,4 +1,4 @@ addSbtPlugin("io.github.joprice" % "sbt-jni" % "0.2.2") addSbtPlugin("com.typesafe.sbt" % "sbt-osgi" % "0.9.6") -addSbtPlugin("com.github.sbt" % "sbt-jacoco" % "3.4.0") +// addSbtPlugin("com.github.sbt" % "sbt-jacoco" % "3.4.0") addSbtPlugin("com.sandinh" % "sbt-java-module-info" % "0.3.0") diff --git a/src/test/scala/Zstd.scala b/src/test/scala/Zstd.scala index b73f07f..0235f41 100644 --- a/src/test/scala/Zstd.scala +++ b/src/test/scala/Zstd.scala @@ -15,7 +15,7 @@ import scala.util.Using class ZstdSpec extends AnyFlatSpec with ScalaCheckPropertyChecks { - implicit override val generatorDrivenConfig = + implicit override val generatorDrivenConfig: PropertyCheckConfiguration = PropertyCheckConfiguration(minSize = 0, sizeRange = 130 * 1024) val levels = List(1, 3, 6, 9)