From 234dcc6120499bb8122e13ab1d6f1198ff874e05 Mon Sep 17 00:00:00 2001 From: "permutive-steward[bot]" <155995252+permutive-steward[bot]@users.noreply.github.com> Date: Mon, 15 Jul 2024 05:02:22 +0000 Subject: [PATCH 1/6] Update http4s-munit to 1.0.0 --- build.sbt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.sbt b/build.sbt index aeb8350..1557c29 100644 --- a/build.sbt +++ b/build.sbt @@ -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.alejandrohdezma" %% "http4s-munit" % "1.0.0" % Test) .settings(Test / fork := true) .dependsOn(`gcp-auth`) From 32ab09fd7c269ebcc7eaa16609a89437c5a54079 Mon Sep 17 00:00:00 2001 From: "permutive-steward[bot]" <155995252+permutive-steward[bot]@users.noreply.github.com> Date: Mon, 15 Jul 2024 05:02:23 +0000 Subject: [PATCH 2/6] Update pureconfig-core to 0.17.7 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 1557c29..0478f3b 100644 --- a/build.sbt +++ b/build.sbt @@ -21,7 +21,7 @@ lazy val `gcp-auth` = module .settings(Test / fork := true) lazy val `gcp-auth-pureconfig` = module - .settings(libraryDependencies += "com.github.pureconfig" %% "pureconfig-core" % "0.17.6") + .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`) From 1089d571f8e933421102152740b548ac8587b277 Mon Sep 17 00:00:00 2001 From: "permutive-steward[bot]" <155995252+permutive-steward[bot]@users.noreply.github.com> Date: Mon, 15 Jul 2024 05:02:23 +0000 Subject: [PATCH 3/6] Update sbt to 1.10.1 --- project/build.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From 500513e4803fd97cc6ace55145431f2eee75f375 Mon Sep 17 00:00:00 2001 From: "permutive-steward[bot]" <155995252+permutive-steward[bot]@users.noreply.github.com> Date: Mon, 15 Jul 2024 05:02:23 +0000 Subject: [PATCH 4/6] Update sbt-mdoc to 2.5.4 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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") From 5c7e848f0984f6e9f6301aa206a4c1e7f6083dd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Herna=CC=81ndez?= Date: Thu, 18 Jul 2024 19:14:11 +0200 Subject: [PATCH 5/6] Update code to MUnit 1.0 --- .../permutive/gcp/auth/pureconfig/TypeTokenSuite.scala | 7 ++++--- .../test/scala/com/permutive/gcp/auth/ParserSuite.scala | 2 +- .../scala/com/permutive/gcp/auth/TokenProviderSuite.scala | 8 ++++---- 3 files changed, 9 insertions(+), 8 deletions(-) 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) From 341d4e3a7a92d69190ce9abd5e4d1d6e16e35e55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Herna=CC=81ndez?= Date: Thu, 18 Jul 2024 19:14:23 +0200 Subject: [PATCH 6/6] Relax `versionPolicyIntention` --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 0478f3b..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")