diff --git a/build.sbt b/build.sbt index aeb8350..0c4309a 100644 --- a/build.sbt +++ b/build.sbt @@ -1,7 +1,7 @@ ThisBuild / scalaVersion := "2.13.14" ThisBuild / crossScalaVersions := Seq("2.12.19", "2.13.14", "3.3.3") ThisBuild / organization := "com.permutive" -ThisBuild / versionPolicyIntention := Compatibility.BinaryAndSourceCompatible +ThisBuild / versionPolicyIntention := Compatibility.BinaryCompatible addCommandAlias("ci-test", "fix --check; versionPolicyCheck; mdoc; publishLocal; +test") addCommandAlias("ci-docs", "github; mdoc; headerCreateAll") @@ -17,11 +17,11 @@ lazy val `gcp-auth` = module .settings(libraryDependencies += "com.permutive" %% "refreshable" % "2.0.0") .settings(libraryDependencies += "org.http4s" %% "http4s-client" % "0.23.27") .settings(libraryDependencies += "org.http4s" %% "http4s-circe" % "0.23.27") - .settings(libraryDependencies += "com.alejandrohdezma" %% "http4s-munit" % "0.15.1" % Test) + .settings(libraryDependencies += "com.alejandrohdezma" %% "http4s-munit" % "1.0.0" % Test) .settings(Test / fork := true) lazy val `gcp-auth-pureconfig` = module - .settings(libraryDependencies += "com.github.pureconfig" %% "pureconfig-core" % "0.17.6") - .settings(libraryDependencies += "com.alejandrohdezma" %% "http4s-munit" % "0.15.1" % Test) + .settings(libraryDependencies += "com.github.pureconfig" %% "pureconfig-core" % "0.17.7") + .settings(libraryDependencies += "com.alejandrohdezma" %% "http4s-munit" % "1.0.0" % Test) .settings(Test / fork := true) .dependsOn(`gcp-auth`) diff --git a/modules/gcp-auth-pureconfig/src/test/scala/com/permutive/gcp/auth/pureconfig/TypeTokenSuite.scala b/modules/gcp-auth-pureconfig/src/test/scala/com/permutive/gcp/auth/pureconfig/TypeTokenSuite.scala index e943c5f..2ffb324 100644 --- a/modules/gcp-auth-pureconfig/src/test/scala/com/permutive/gcp/auth/pureconfig/TypeTokenSuite.scala +++ b/modules/gcp-auth-pureconfig/src/test/scala/com/permutive/gcp/auth/pureconfig/TypeTokenSuite.scala @@ -24,14 +24,15 @@ import com.permutive.gcp.auth.models.ExpiresIn import com.permutive.gcp.auth.models.Token import io.circe.Json import io.circe.syntax._ -import munit.ClientSuite +import munit.CatsEffectSuite +import munit.Http4sMUnitSyntax import org.http4s.HttpApp import org.http4s.circe._ import org.http4s.client.Client import pureconfig.ConfigReader import pureconfig.ConfigSource -class TypeTokenSuite extends ClientSuite { +class TypeTokenSuite extends CatsEffectSuite with Http4sMUnitSyntax { fixture("/").test { "TokenType.UserAccount can be loaded from configuration" @@ -86,7 +87,7 @@ class TypeTokenSuite extends ClientSuite { implicit val ConfigConfigReader: ConfigReader[Config] = ConfigReader.forProduct1("token-type")(Config.apply) - def fixture(resource: String) = ResourceFixture { + def fixture(resource: String) = ResourceFunFixture { Resource.make { IO(sys.props("user.home")).flatTap(_ => IO(sys.props.put("user.home", getClass.getResource(resource).getPath()))) }(userHome => IO(sys.props.put("user.home", userHome)).void) diff --git a/modules/gcp-auth/src/test/scala/com/permutive/gcp/auth/ParserSuite.scala b/modules/gcp-auth/src/test/scala/com/permutive/gcp/auth/ParserSuite.scala index 9784792..fb48ca9 100644 --- a/modules/gcp-auth/src/test/scala/com/permutive/gcp/auth/ParserSuite.scala +++ b/modules/gcp-auth/src/test/scala/com/permutive/gcp/auth/ParserSuite.scala @@ -171,7 +171,7 @@ class ParserSuite extends CatsEffectSuite { // Parser.applicationDefaultCredentials // ////////////////////////////////////////// - def fixture(resource: String) = ResourceFixture { + def fixture(resource: String) = ResourceFunFixture { Resource.make { IO(sys.props("user.home")).flatTap(_ => IO(sys.props.put("user.home", getClass.getResource(resource).getPath()))) }(userHome => IO(sys.props.put("user.home", userHome)).void) diff --git a/modules/gcp-auth/src/test/scala/com/permutive/gcp/auth/TokenProviderSuite.scala b/modules/gcp-auth/src/test/scala/com/permutive/gcp/auth/TokenProviderSuite.scala index b780ce7..cf4da68 100644 --- a/modules/gcp-auth/src/test/scala/com/permutive/gcp/auth/TokenProviderSuite.scala +++ b/modules/gcp-auth/src/test/scala/com/permutive/gcp/auth/TokenProviderSuite.scala @@ -37,17 +37,17 @@ import com.permutive.gcp.auth.models.Token import fs2.Stream import io.circe.Json import io.circe.syntax._ -import munit.ClientSuite +import munit.CatsEffectSuite +import munit.Http4sMUnitSyntax import org.http4s.HttpApp import org.http4s.Request import org.http4s.circe._ import org.http4s.client.Client -import org.http4s.syntax.all._ import org.typelevel.ci._ import pdi.jwt.JwtCirce import pdi.jwt.JwtClaim -class TokenProviderSuite extends ClientSuite { +class TokenProviderSuite extends CatsEffectSuite with Http4sMUnitSyntax { ///////////////////////// // TokenProvider.const // @@ -230,7 +230,7 @@ class TokenProviderSuite extends ClientSuite { // TokenProvider.userAccount(Client) // /////////////////////////////////////// - def fixture(resource: String) = ResourceFixture { + def fixture(resource: String) = ResourceFunFixture { Resource.make { IO(sys.props("user.home")).flatTap(_ => IO(sys.props.put("user.home", getClass.getResource(resource).getPath()))) }(userHome => IO(sys.props.put("user.home", userHome)).void) diff --git a/project/build.properties b/project/build.properties index b485f62..cb409aa 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.10.0 \ No newline at end of file +sbt.version=1.10.1 \ No newline at end of file diff --git a/project/plugins.sbt b/project/plugins.sbt index 2b0fe50..f9416e4 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -12,5 +12,5 @@ addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1. addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.10.0") addSbtPlugin("ch.epfl.scala" % "sbt-version-policy" % "3.2.1") addSbtPlugin("org.typelevel" % "sbt-tpolecat" % "0.5.1") -addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.5.2") +addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.5.4") addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.2")