Skip to content

Commit 9e9b8c9

Browse files
committed
Add command for JVM/Native tests, use them in the CI
1 parent 350a2be commit 9e9b8c9

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,10 @@ jobs:
2525
distribution: temurin
2626
java-version: ${{matrix.java}}
2727
- uses: sbt/setup-sbt@v1
28-
- name: Test
29-
run: sbt "setScalaVersion ${{matrix.scala}}" test core/headerCheck package
28+
- name: Test JVM
29+
run: sbt "setScalaVersion ${{matrix.scala}}" testJVM core/headerCheck package
30+
- name: Test Native
31+
run: sbt "setScalaVersion ${{matrix.scala}}" testNative
3032

3133
test-rc:
3234
strategy:
@@ -52,4 +54,4 @@ jobs:
5254
java-version: ${{matrix.java}}
5355
- uses: sbt/setup-sbt@v1
5456
- name: Test
55-
run: sbt "setScalaVersion ${{matrix.scala}}" test core/headerCheck package
57+
run: sbt "setScalaVersion ${{matrix.scala}}" testJVM core/headerCheck package

build.sbt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,3 +107,14 @@ commands += Command.single("setScalaVersion") { (state, arg) =>
107107
}
108108
command :: state
109109
}
110+
111+
def testPlatformCommand(name: String, selector: ProjectMatrix => sbt.internal.ProjectFinder): Command =
112+
Command.command(name) { state =>
113+
List(junit, scalacheck, testmacros)
114+
.flatMap(selector(_).get)
115+
.map{ project => s"${project.id}/test"}
116+
.toList ::: state
117+
}
118+
119+
commands += testPlatformCommand("testNative", _.native)
120+
commands += testPlatformCommand("testJVM", _.jvm)

0 commit comments

Comments
 (0)