Skip to content

Commit

Permalink
Enable examples in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Michal Bednarz committed Nov 6, 2020
1 parent 785cfa8 commit d10b5b3
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ jobs:
script: ci/tests/run probe 2.13.1
- name: test-scala @ scala-2.13
script: ci/tests/run scala 2.13.1
- name: test-examples @ scala-2.13
script: ci/tests/run examples 2.13.1
- stage: Release
name: Release
script: sbt ci-release
6 changes: 3 additions & 3 deletions examples/src/test/resources/ideprobe.conf
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ probe {
]
}
endpoints.awaitIdle {
initialWait = "0 seconds"
newTaskWait = "1 second"
checkFrequency = "100 millis"
initialWait = "5 seconds"
newTaskWait = "2 second"
checkFrequency = "50 millis"
}
paths.screenshots = ${?IDEPROBE_SCREENSHOTS_DIR}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class ModuleTest extends IdeProbeFixture with ScalaPluginExtension with RobotPlu
"projects/dokka.conf"
)
)
@Test def runTestsInDifferentScopes(configName: String): Unit = fixtureFromConfig(configName).run { intelliJ =>
def runTestsInDifferentScopes(configName: String): Unit = fixtureFromConfig(configName).run { intelliJ =>
val runnerToSelect = intelliJ.config.get[String]("runner")
val modulesToTest = intelliJ.config[Seq[String]]("modules.test")
intelliJ.probe.build().assertSuccess()
Expand Down
4 changes: 3 additions & 1 deletion project/CI.scala
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@ import sbt.Keys.loadedBuild
import sbt.{Def, ProjectRef, _}

object CI {
private val excluded = Set("ci", "ide-probe", "ideprobe", "probe", "examples")
private val excluded = Set("ci", "ide-probe", "ideprobe", "probe")
lazy val generateScripts = taskKey[Seq[File]]("Generate CI scripts")

private def scalaVersionToModulePostfix(scalaVersion: String): String =
scalaVersion.split("\\.").dropRight(1).mkString("_")

def groupedProjects(scalaVersions: List[String]): Def.Initialize[Task[Map[String, Seq[ProjectRef]]]] = Def.task {
val extensionDir = Paths.get(loadedBuild.value.root).resolve("extensions")
val examplesDir = Paths.get(loadedBuild.value.root).resolve("examples")
val excludedCross = for {
version <- scalaVersions
module <- excluded
Expand All @@ -23,6 +24,7 @@ object CI {
case (_, project) =>
val projectPath = project.base.toPath
if (projectPath.startsWith(extensionDir)) extensionDir.relativize(projectPath).getName(0).toString
else if (projectPath.startsWith(examplesDir)) "examples"
else "probe"
}
.mapValues(_.map(_._1))
Expand Down

0 comments on commit d10b5b3

Please sign in to comment.