From 08ba30887a7533b818fe8886e720b1f6b30ee3aa Mon Sep 17 00:00:00 2001 From: Antonio Gelameris Date: Sat, 13 May 2023 17:35:00 +0200 Subject: [PATCH 1/3] Separating the test artifact --- .github/workflows/ci.yml | 4 ++-- .mergify.yml | 8 ++++++++ build.sbt | 13 +++++++++++-- 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index eacf40b..96aa7a5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -89,11 +89,11 @@ jobs: - name: Make target directories if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main') - run: mkdir -p toolkit/js/target target toolkit/native/target .js/target site/target toolkit/jvm/target .jvm/target .native/target project/target + run: mkdir -p toolkit/js/target toolkit-test/jvm/target toolkit-test/native/target target toolkit/native/target .js/target toolkit-test/js/target site/target toolkit/jvm/target .jvm/target .native/target project/target - name: Compress target directories if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main') - run: tar cf targets.tar toolkit/js/target target toolkit/native/target .js/target site/target toolkit/jvm/target .jvm/target .native/target project/target + run: tar cf targets.tar toolkit/js/target toolkit-test/jvm/target toolkit-test/native/target target toolkit/native/target .js/target toolkit-test/js/target site/target toolkit/jvm/target .jvm/target .native/target project/target - name: Upload target directories if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main') diff --git a/.mergify.yml b/.mergify.yml index c77c05d..49ba5cc 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -34,3 +34,11 @@ pull_request_rules: add: - toolkit remove: [] +- name: Label toolkit-test PRs + conditions: + - files~=^toolkit-test/ + actions: + label: + add: + - toolkit-test + remove: [] diff --git a/build.sbt b/build.sbt index f6af706..36eabab 100644 --- a/build.sbt +++ b/build.sbt @@ -11,7 +11,7 @@ ThisBuild / mergifyStewardConfig ~= { ThisBuild / crossScalaVersions := Seq("2.13.10", "3.2.2") -lazy val root = tlCrossRootProject.aggregate(toolkit) +lazy val root = tlCrossRootProject.aggregate(toolkit, toolkitTest) lazy val toolkit = crossProject(JVMPlatform, JSPlatform, NativePlatform) .in(file("toolkit")) @@ -26,7 +26,16 @@ lazy val toolkit = crossProject(JVMPlatform, JSPlatform, NativePlatform) "org.http4s" %%% "http4s-ember-client" % "0.23.19", "io.circe" %%% "circe-jawn" % "0.14.5", "org.http4s" %%% "http4s-circe" % "0.23.19", - "com.monovore" %%% "decline-effect" % "2.4.1", + "com.monovore" %%% "decline-effect" % "2.4.1" + ), + mimaPreviousArtifacts := Set() + ) + +lazy val toolkitTest = crossProject(JVMPlatform, JSPlatform, NativePlatform) + .in(file("toolkit-test")) + .settings( + name := "toolkit-test", + libraryDependencies ++= Seq( "org.scalameta" %%% "munit" % "1.0.0-M7", // not % Test, on purpose :) "org.typelevel" %%% "munit-cats-effect" % "2.0.0-M3" ), From bdfe7143ed5351ef90061749c9481c5c810b5149 Mon Sep 17 00:00:00 2001 From: Arman Bilge Date: Mon, 22 May 2023 14:27:00 -0400 Subject: [PATCH 2/3] Add explicit CE dep to `toolkitTest` --- build.sbt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build.sbt b/build.sbt index 36eabab..a09c332 100644 --- a/build.sbt +++ b/build.sbt @@ -36,6 +36,8 @@ lazy val toolkitTest = crossProject(JVMPlatform, JSPlatform, NativePlatform) .settings( name := "toolkit-test", libraryDependencies ++= Seq( + "org.typelevel" %%% "cats-core" % "2.9.0", + "org.typelevel" %%% "cats-effect-testkit" % "3.5.0", "org.scalameta" %%% "munit" % "1.0.0-M7", // not % Test, on purpose :) "org.typelevel" %%% "munit-cats-effect" % "2.0.0-M3" ), From 17f001015f49c9f10f8826193be65af56140ddee Mon Sep 17 00:00:00 2001 From: Arman Bilge Date: Mon, 22 May 2023 18:42:52 +0000 Subject: [PATCH 3/3] Update deps --- docs/index.md | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/docs/index.md b/docs/index.md index 957af99..4d895d2 100644 --- a/docs/index.md +++ b/docs/index.md @@ -25,9 +25,16 @@ To use it with [Scala CLI] use this directive: Albeit being created to be used with [Scala CLI], typelevel-toolkit can be imported into your `build.sbt` using: ```scala -libraryDependencies += "org.typelevel" %% "toolkit" % "@VERSION@" -// for native and js -libraryDependencies += "org.typelevel" %%% "toolkit" % "@VERSION@" +libraryDependencies ++= Seq( + "org.typelevel" %% "toolkit" % "@VERSION@", + "org.typelevel" %% "toolkit-test" % "@VERSION@" % Test +) + +// use %%% for Scala.js and Scala Native +libraryDependencies ++= Seq( + "org.typelevel" %%% "toolkit" % "@VERSION@", + "org.typelevel" %%% "toolkit-test" % "@VERSION@" % Test +) ``` ## Quick Start Example