-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
run scripted tests against entire build matrix
- Loading branch information
Showing
4 changed files
with
63 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import sbtide.Keys.ideSkipProject | ||
import sbt.Keys._ | ||
import sbt.ScriptedPlugin.autoImport._ | ||
import sbt._ | ||
import sbt.internal.ProjectMatrix | ||
|
||
case class PlayAxis(version: String, idSuffix: String, directorySuffix: String) extends VirtualAxis.WeakAxis | ||
|
||
object PlayAxis { | ||
def apply(version: String): PlayAxis = | ||
PlayAxis(version, "-play" + version.replace('.', '_'), "-play" + version) | ||
|
||
implicit class RichProjectMatrix(val matrix: ProjectMatrix) extends AnyVal { | ||
def scriptedTests(playAxis: PlayAxis, scalaVersion: String): ProjectMatrix = matrix.customRow( | ||
autoScalaLibrary = false, | ||
axisValues = Seq(playAxis, VirtualAxis.scalaPartialVersion(scalaVersion), VirtualAxis.jvm), | ||
_.enablePlugins(ScriptedPlugin).settings( | ||
compile / skip := true, | ||
publish / skip := true, | ||
ideSkipProject := true, | ||
moduleName := s"${moduleName.value}-test-${playAxis.version}-$scalaVersion", | ||
scriptedLaunchOpts ++= Seq( | ||
"-Xmx1024M", | ||
s"-Dplugin.version=${version.value}", | ||
s"-Dscala.version=$scalaVersion", | ||
s"-Dplay.version=${playAxis.version}" | ||
), | ||
scriptedBufferLog := true | ||
) | ||
) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters