Skip to content

Commit

Permalink
Build: split integration tests into a separate subproject (#588)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexklibisz authored Nov 19, 2023
1 parent 50dc2de commit c56d7ae
Show file tree
Hide file tree
Showing 25 changed files with 19 additions and 7 deletions.
13 changes: 9 additions & 4 deletions Taskfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ tasks:
jvmCompile:
desc: Compile Scala and Java code using SBT
cmds:
- sbt -client "compile; Test/compile; IntegrationTest/compile"
- sbt -client "compile; Test/compile"

jvmAssemble:
desc: Build the plugin bundle using SBT
Expand All @@ -169,17 +169,22 @@ tasks:
jvmIntegrationTest:
desc: Run JVM tests using SBT
cmds:
- sbt -client IntegrationTest/test
- sbt -client elastiknn-plugin-integration-tests/test

jvmIntegrationTestQuick:
desc: Run JVM tests using SBT, but only the ones that were recompiled
cmds:
- sbt -client IntegrationTest/testQuick
- sbt -client elastiknn-plugin-integration-tests/testQuick

jvmUnitTest:
desc: Run JVM tests using SBT
cmds:
- sbt -client test
- sbt -client elastiknn-api4s/test
- sbt -client elastiknn-client-elastic4s/test
- sbt -client elastiknn-lucene/test
- sbt -client elastiknn-models/test
- sbt -client elastiknn-models-benchmarks/test
- sbt -client elastiknn-plugin/test

jvmUnitTestQuick:
desc: Run JVM tests using SBT, but only the ones that were recompiled
Expand Down
13 changes: 10 additions & 3 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ lazy val `elastiknn-root` = project
`elastiknn-lucene`,
`elastiknn-models`,
`elastiknn-models-benchmarks`,
`elastiknn-plugin`
`elastiknn-plugin`,
`elastiknn-plugin-integration-tests`
)

lazy val `elastiknn-api4s` = project
Expand Down Expand Up @@ -104,7 +105,6 @@ lazy val `elastiknn-plugin` = project
`elastiknn-lucene` % "compile->compile;test->test",
`elastiknn-client-elastic4s` % "test->compile"
)
.configs(IntegrationTest.extend(Test))
.settings(
name := "elastiknn",
version := ElastiknnVersion,
Expand All @@ -125,6 +125,13 @@ lazy val `elastiknn-plugin` = project
"com.klibisz.futil" %% "futil" % "0.1.2" % Test
),
scalacOptions ++= ScalacOptions,
Defaults.itSettings,
TestSettings
)

lazy val `elastiknn-plugin-integration-tests` = project
.in(file("elastiknn-plugin-integration-tests"))
.dependsOn(`elastiknn-plugin` % "test->test")
.settings(
scalacOptions ++= ScalacOptions,
TestSettings
)

0 comments on commit c56d7ae

Please sign in to comment.