This commit is contained in:
Johan Andrén 2017-10-04 14:22:25 +02:00 committed by GitHub
parent b03b777040
commit 9e68d6e88f
2 changed files with 65 additions and 16 deletions

View file

@ -105,6 +105,7 @@ object ValidatePullRequest extends AutoPlugin {
def runningLocally: Boolean = !runningOnJenkins
override lazy val buildSettings = Seq(
sourceBranch in Global in ValidatePR := {
sys.env.get(SourceBranchEnvVarName) orElse
sys.env.get(SourcePullIdJenkinsEnvVarName).map("pullreq/" + _) getOrElse // Set by "GitHub pull request builder plugin"
@ -189,6 +190,11 @@ object ValidatePullRequest extends AutoPlugin {
testOptions in ValidatePR += Tests.Argument(TestFrameworks.ScalaTest, "-l", "long-running"),
testOptions in ValidatePR += Tests.Argument(TestFrameworks.ScalaTest, "-l", "timing"),
// make it fork just like regular test running
fork in ValidatePR := (fork in Test).value,
testGrouping in ValidatePR := (testGrouping in Test).value,
javaOptions in ValidatePR := (javaOptions in Test).value,
projectBuildMode in ValidatePR := {
val log = streams.value.log
log.debug(s"Analysing project (for inclusion in PR validation): [${name.value}]")