Validate compile in multi-jvm (#26400)
* New validateCompile task for multi jvm to run in travis
This commit is contained in:
parent
6394b979bd
commit
2e247001f7
3 changed files with 12 additions and 4 deletions
|
|
@ -15,6 +15,11 @@ import org.scalafmt.sbt.ScalafmtPlugin.scalafmtConfigSettings
|
|||
|
||||
object MultiNode extends AutoPlugin {
|
||||
|
||||
object autoImport {
|
||||
val validateCompile = taskKey[Unit]("Validates compile for any project it is enabled")
|
||||
}
|
||||
import autoImport._
|
||||
|
||||
// MultiJvm tests can be excluded from normal test target an validatePullRequest
|
||||
// with -Dakka.test.multi-in-test=false
|
||||
val multiNodeTestInTest: Boolean =
|
||||
|
|
@ -55,6 +60,10 @@ object MultiNode extends AutoPlugin {
|
|||
"-Xmx256m" :: akkaProperties ::: CliOptions.sbtLogNoFormat.ifTrue("-Dakka.test.nocolor=true").toList
|
||||
}
|
||||
|
||||
private val anyConfigsInThisProject = ScopeFilter(
|
||||
configurations = inAnyConfiguration
|
||||
)
|
||||
|
||||
private val multiJvmSettings =
|
||||
SbtMultiJvm.multiJvmSettings ++
|
||||
inConfig(MultiJvm)(scalafmtConfigSettings) ++
|
||||
|
|
@ -99,8 +108,7 @@ object MultiNode extends AutoPlugin {
|
|||
(headerCreate in MultiJvm).value
|
||||
(compile in MultiJvm).value
|
||||
}) ++ headerSettings(MultiJvm) ++ Seq(
|
||||
// only works if I put it here ¯\_(ツ)_/¯
|
||||
compile in MultiJvm := ((compile in MultiJvm).triggeredBy(compile in Test)).value
|
||||
validateCompile := compile.?.all(anyConfigsInThisProject).value
|
||||
)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue