diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dd9c7e46..97a5c45b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,7 +29,7 @@ jobs: matrix: os: [ubuntu-22.04] scala: [3, 2.12, 2.13] - java: [temurin@8] + java: [temurin@11] project: [rootJS, rootJVM, rootNative] runs-on: ${{ matrix.os }} timeout-minutes: 60 @@ -42,24 +42,24 @@ jobs: - name: Setup sbt uses: sbt/setup-sbt@v1 - - name: Setup Java (temurin@8) - id: setup-java-temurin-8 - if: matrix.java == 'temurin@8' + - name: Setup Java (temurin@11) + id: setup-java-temurin-11 + if: matrix.java == 'temurin@11' uses: actions/setup-java@v5 with: distribution: temurin - java-version: 8 + java-version: 11 cache: sbt - name: sbt update - if: matrix.java == 'temurin@8' && steps.setup-java-temurin-8.outputs.cache-hit == 'false' + if: matrix.java == 'temurin@11' && steps.setup-java-temurin-11.outputs.cache-hit == 'false' run: sbt +update - name: Check that workflows are up to date run: sbt githubWorkflowCheck - name: Check headers and formatting - if: matrix.java == 'temurin@8' && matrix.os == 'ubuntu-22.04' + if: matrix.java == 'temurin@11' && matrix.os == 'ubuntu-22.04' run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' headerCheckAll scalafmtCheckAll 'project /' scalafmtSbtCheck - name: scalaJSLink @@ -74,11 +74,11 @@ jobs: run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' test - name: Check binary compatibility - if: matrix.java == 'temurin@8' && matrix.os == 'ubuntu-22.04' + if: matrix.java == 'temurin@11' && matrix.os == 'ubuntu-22.04' run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' mimaReportBinaryIssues - name: Generate API documentation - if: matrix.java == 'temurin@8' && matrix.os == 'ubuntu-22.04' + if: matrix.java == 'temurin@11' && matrix.os == 'ubuntu-22.04' run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' doc - name: Make target directories @@ -103,7 +103,7 @@ jobs: strategy: matrix: os: [ubuntu-22.04] - java: [temurin@8] + java: [temurin@11] runs-on: ${{ matrix.os }} steps: - name: Checkout current branch (full) @@ -114,17 +114,17 @@ jobs: - name: Setup sbt uses: sbt/setup-sbt@v1 - - name: Setup Java (temurin@8) - id: setup-java-temurin-8 - if: matrix.java == 'temurin@8' + - name: Setup Java (temurin@11) + id: setup-java-temurin-11 + if: matrix.java == 'temurin@11' uses: actions/setup-java@v5 with: distribution: temurin - java-version: 8 + java-version: 11 cache: sbt - name: sbt update - if: matrix.java == 'temurin@8' && steps.setup-java-temurin-8.outputs.cache-hit == 'false' + if: matrix.java == 'temurin@11' && steps.setup-java-temurin-11.outputs.cache-hit == 'false' run: sbt +update - name: Download target directories (3, rootJS) @@ -247,7 +247,7 @@ jobs: strategy: matrix: os: [ubuntu-22.04] - java: [temurin@8] + java: [temurin@11] runs-on: ${{ matrix.os }} steps: - name: Checkout current branch (full) @@ -258,17 +258,17 @@ jobs: - name: Setup sbt uses: sbt/setup-sbt@v1 - - name: Setup Java (temurin@8) - id: setup-java-temurin-8 - if: matrix.java == 'temurin@8' + - name: Setup Java (temurin@11) + id: setup-java-temurin-11 + if: matrix.java == 'temurin@11' uses: actions/setup-java@v5 with: distribution: temurin - java-version: 8 + java-version: 11 cache: sbt - name: sbt update - if: matrix.java == 'temurin@8' && steps.setup-java-temurin-8.outputs.cache-hit == 'false' + if: matrix.java == 'temurin@11' && steps.setup-java-temurin-11.outputs.cache-hit == 'false' run: sbt +update - name: Submit Dependencies diff --git a/build.sbt b/build.sbt index f720517b..3171726e 100644 --- a/build.sbt +++ b/build.sbt @@ -16,18 +16,22 @@ name := "cats-effect-testing" -ThisBuild / tlBaseVersion := "1.7" +ThisBuild / tlBaseVersion := "1.8" ThisBuild / startYear := Some(2020) ThisBuild / developers += tlGitHubDev("djspiewak", "Daniel Spiewak") -ThisBuild / crossScalaVersions := Seq("3.3.6", "2.12.21", "2.13.18") +ThisBuild / crossScalaVersions := Seq("3.3.7", "2.12.21", "2.13.18") ThisBuild / tlVersionIntroduced := Map("3" -> "1.1.1") ThisBuild / tlCiReleaseBranches := Seq("series/1.x") -val CatsEffectVersion = "3.6.3" -val ScalaTestVersion = "3.2.18" +ThisBuild / githubWorkflowJavaVersions := Seq(JavaSpec.temurin("11")) + +val CatsEffectVersion = "3.7.0" +val ScalaTestVersion = "3.2.19" + +val NativeVersionIntroduced = "1.8.0" lazy val root = tlCrossRootProject .aggregate(core, specs2, utest, minitest, scalatest) @@ -38,15 +42,15 @@ lazy val core = crossProject(JSPlatform, JVMPlatform, NativePlatform) name := "cats-effect-testing-core", tlVersionIntroduced := List("2.12", "2.13", "3").map(_ -> "1.3.0").toMap, libraryDependencies += "org.typelevel" %%% "cats-effect" % CatsEffectVersion) - .nativeSettings(tlVersionIntroduced := List("2.12", "2.13", "3").map(_ -> "1.5.0").toMap) + .nativeSettings(tlVersionIntroduced := List("2.12", "2.13", "3").map(_ -> NativeVersionIntroduced).toMap) lazy val specs2 = crossProject(JSPlatform, JVMPlatform, NativePlatform) .in(file("specs2")) .dependsOn(core) .settings( name := "cats-effect-testing-specs2", - libraryDependencies += "org.specs2" %%% "specs2-core" % "4.20.5") - .nativeSettings(tlVersionIntroduced := List("2.12", "2.13", "3").map(_ -> "1.5.0").toMap) + libraryDependencies += "org.specs2" %%% "specs2-core" % "4.20.9") + .nativeSettings(tlVersionIntroduced := List("2.12", "2.13", "3").map(_ -> NativeVersionIntroduced).toMap) lazy val scalatest = crossProject(JSPlatform, JVMPlatform, NativePlatform) .in(file("scalatest")) @@ -60,7 +64,7 @@ lazy val scalatest = crossProject(JSPlatform, JVMPlatform, NativePlatform) "org.scalatest" %%% "scalatest-mustmatchers" % ScalaTestVersion % Test, "org.scalatest" %%% "scalatest-freespec" % ScalaTestVersion % Test, "org.scalatest" %%% "scalatest-wordspec" % ScalaTestVersion % Test)) - .nativeSettings(tlVersionIntroduced := List("2.12", "2.13", "3").map(_ -> "1.5.0").toMap) + .nativeSettings(tlVersionIntroduced := List("2.12", "2.13", "3").map(_ -> NativeVersionIntroduced).toMap) lazy val utest = crossProject(JSPlatform, JVMPlatform, NativePlatform) .in(file("utest")) @@ -72,10 +76,10 @@ lazy val utest = crossProject(JSPlatform, JVMPlatform, NativePlatform) libraryDependencies ++= Seq( "org.typelevel" %%% "cats-effect-testkit" % CatsEffectVersion, - "com.lihaoyi" %%% "utest" % "0.8.2"), + "com.lihaoyi" %%% "utest" % "0.9.0"), Test / scalacOptions -= "-Xfatal-warnings") - .nativeSettings(tlVersionIntroduced := List("2.12", "2.13", "3").map(_ -> "1.5.0").toMap) + .nativeSettings(tlVersionIntroduced := List("2.12", "2.13", "3").map(_ -> NativeVersionIntroduced).toMap) lazy val minitest = crossProject(JSPlatform, JVMPlatform) .in(file("minitest")) diff --git a/core/shared/src/main/scala/cats/effect/testing/UnsafeRun.scala b/core/shared/src/main/scala/cats/effect/testing/UnsafeRun.scala index 487cbca8..a3fdce61 100644 --- a/core/shared/src/main/scala/cats/effect/testing/UnsafeRun.scala +++ b/core/shared/src/main/scala/cats/effect/testing/UnsafeRun.scala @@ -17,14 +17,15 @@ package cats.effect package testing -import scala.annotation.nowarn import scala.concurrent.Future import scala.concurrent.duration.FiniteDuration trait UnsafeRun[F[_]] { def unsafeToFuture[A](fa: F[A]): Future[A] - def unsafeToFuture[A](fa: F[A], @nowarn("msg=never used") timeout: Option[FiniteDuration]): Future[A] - = unsafeToFuture(fa) // For binary compatibility + def unsafeToFuture[A](fa: F[A], timeout: Option[FiniteDuration]): Future[A] = { + val _ = timeout + unsafeToFuture(fa) // For binary compatibility + } } object UnsafeRun { diff --git a/project/build.properties b/project/build.properties index c605beba..b49295c7 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.12.3 +sbt.version=1.12.5 diff --git a/project/plugins.sbt b/project/plugins.sbt index c6912ffe..7eec38e9 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,4 +1,4 @@ -addSbtPlugin("org.typelevel" % "sbt-typelevel" % "0.8.4") +addSbtPlugin("org.typelevel" % "sbt-typelevel" % "0.8.5") addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.20.2") -addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.17") +addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.5.10") addSbtPlugin("org.portable-scala" % "sbt-scala-native-crossproject" % "1.3.2")