Skip to content

Commit

Permalink
Merge pull request #39 from TonioGela/test-artifact
Browse files Browse the repository at this point in the history
Separating the test artifact
  • Loading branch information
armanbilge authored May 22, 2023
2 parents 7bf61bf + 17f0010 commit a099d4c
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
8 changes: 8 additions & 0 deletions .mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: []
15 changes: 13 additions & 2 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
Expand All @@ -26,7 +26,18 @@ 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.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"
),
Expand Down
13 changes: 10 additions & 3 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a099d4c

Please sign in to comment.