Skip to content

Commit

Permalink
Change timeout for test suites
Browse files Browse the repository at this point in the history
  • Loading branch information
Michal Bednarz committed Nov 23, 2020
1 parent 6dc14a5 commit 762906f
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 11 deletions.
1 change: 0 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
push:
branches:
- master
- 2020.3
tags:
- '**'

Expand Down
18 changes: 15 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,30 @@ on: pull_request

jobs:
test:
timeout-minutes: 120
timeout-minutes: 50
runs-on: ubuntu-latest
name: test-${{ matrix.type }}
strategy:
matrix:
type: [probe 2.12.10, probe 2.13.1, scala 2.13.1, examples 2.13.1]
type: [probe 2.12.10, probe 2.13.1, scala 2.13.1]
steps:
- uses: actions/checkout@v2
- name: generate scripts
run: sbt ci/generateScripts
- name: build image
run: sh ci/tests/build_image
- name: test
run: sh ci/tests/run ${{ matrix.type }}

examples:
timeout-minutes: 120
runs-on: ubuntu-latest
name: test-examples 2.13.1
steps:
- uses: actions/checkout@v2
- name: generate scripts
run: sbt ci/generateScripts
- name: build image
run: sh ci/tests/build_image
- name: test
run: sh ci/tests/run ${{ matrix.type }}
run: sh ci/tests/run examples 2.13.1
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ final class ProbeDriverTest extends IdeProbeFixture with Assertions with RobotPl
@Test
def expandsMacro(): Unit =
fixture.copy(workspaceProvider = WorkspaceTemplate.FromResource("gradle-project")).run { intelliJ =>
val projectRef = intelliJ.probe.withRobot.openProject(intelliJ.workspace)
val projectRef = intelliJ.probe.openProject(intelliJ.workspace)
val fileExtension =
intelliJ.probe
.expandMacro("$FileExt$", FileRef(intelliJ.workspace.resolve("build.gradle"), projectRef))
Expand All @@ -115,7 +115,7 @@ final class ProbeDriverTest extends IdeProbeFixture with Assertions with RobotPl
val projectDir = intelliJ.workspace.resolve("build.gradle")
val src = intelliJ.workspace.resolve("src")

intelliJ.probe.withRobot.openProject(projectDir)
intelliJ.probe.openProject(projectDir)

val model = intelliJ.probe.projectModel()
val mainModule = model.modules.find(_.name == "foo.main").get
Expand All @@ -132,7 +132,7 @@ final class ProbeDriverTest extends IdeProbeFixture with Assertions with RobotPl
def listsModuleDependencies(): Unit = {
fixture.copy(workspaceProvider = WorkspaceTemplate.FromResource("gradle-project")).run { intelliJ =>
val projectDir = intelliJ.workspace.resolve("build.gradle")
val p = intelliJ.probe.withRobot.openProject(projectDir)
val p = intelliJ.probe.openProject(projectDir)

val testModule = intelliJ.probe.projectModel().modules.find(_.name == "foo.test").get
assertEquals(Set(ModuleRef("foo.main", p)), testModule.dependencies)
Expand All @@ -146,7 +146,7 @@ final class ProbeDriverTest extends IdeProbeFixture with Assertions with RobotPl
.run { intelliJ =>
val projectDir = intelliJ.workspace.resolve("simple-sbt-project")

intelliJ.probe.withRobot.openProject(projectDir)
intelliJ.probe.openProject(projectDir)

val successfulResult = intelliJ.probe.build()
assertEquals(successfulResult.errors, Nil)
Expand All @@ -167,7 +167,7 @@ final class ProbeDriverTest extends IdeProbeFixture with Assertions with RobotPl
def buildFilesTest(): Unit = {
buildTestFixture.run { intelliJ =>
val projectDir = intelliJ.workspace.resolve("simple-sbt-project")
val project = intelliJ.probe.withRobot.openProject(projectDir)
val project = intelliJ.probe.openProject(projectDir)

val compilingFile = projectDir.resolve("src/main/scala/Main.scala")
val nonCompilingFile = projectDir.resolve("src/main/scala/Incorrect.scala")
Expand All @@ -189,7 +189,7 @@ final class ProbeDriverTest extends IdeProbeFixture with Assertions with RobotPl
.run { intelliJ =>
val projectDir = intelliJ.workspace.resolve("simple-sbt-project")

intelliJ.probe.withRobot.openProject(projectDir)
intelliJ.probe.openProject(projectDir)

intelliJ.probe.build()
val configuration = TestScope.Module(ModuleRef("simple-sbt-project"))
Expand Down Expand Up @@ -260,7 +260,7 @@ final class ProbeDriverTest extends IdeProbeFixture with Assertions with RobotPl
@Test
def runTestsInDifferentScopes(): Unit = {
fixture.copy(workspaceProvider = WorkspaceTemplate.FromResource("gradle-project")).run { intelliJ =>
intelliJ.probe.withRobot.openProject(intelliJ.workspace)
intelliJ.probe.openProject(intelliJ.workspace)
intelliJ.probe.build().assertSuccess()
val moduleRef = ModuleRef("foo.test")

Expand Down

0 comments on commit 762906f

Please sign in to comment.