Skip to content

Commit 2e84d05

Browse files
authored
Merge pull request #3872 from Gedochao/maintenance/jvm-bootstrapped-tests
Run the default (Scala 3 Next) suite with the JVM bootstrapped launcher on the CI
2 parents e15441f + 350ff36 commit 2e84d05

File tree

3 files changed

+30
-41
lines changed

3 files changed

+30
-41
lines changed

.github/workflows/ci.yml

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,31 @@ jobs:
7373
run: |
7474
fish -c './mill __.compile'
7575
76+
jvm-bootstrapped-tests:
77+
timeout-minutes: 120
78+
runs-on: ubuntu-24.04
79+
steps:
80+
- uses: actions/checkout@v5
81+
with:
82+
fetch-depth: 0
83+
submodules: true
84+
- uses: VirtusLab/scala-cli-setup@v1
85+
with:
86+
jvm: "temurin:17"
87+
- name: JVM integration tests
88+
run: ./mill -i integration.test.jvmBootstrapped
89+
env:
90+
SCALA_CLI_IT_GROUP: 1
91+
- name: Convert Mill test reports to JUnit XML format
92+
if: success() || failure()
93+
run: .github/scripts/generate-junit-reports.sc jvm-bootstrapped-tests 'Scala CLI JVM Bootstrapped Tests' test-report.xml out/
94+
- name: Upload test report
95+
uses: actions/upload-artifact@v4
96+
if: success() || failure()
97+
with:
98+
name: test-results-jvm-bootstrapped-tests
99+
path: test-report.xml
100+
76101
jvm-tests-1:
77102
timeout-minutes: 120
78103
runs-on: ubuntu-24.04
@@ -88,9 +113,6 @@ jobs:
88113
run: ./mill -i integration.test.jvm
89114
env:
90115
SCALA_CLI_IT_GROUP: 1
91-
- name: Fat jar integration test
92-
if: success() || failure()
93-
run: ./mill integration.test.jvmBootstrapped 'scala.cli.integration.StandaloneLauncherTests.*'
94116
- name: Convert Mill test reports to JUnit XML format
95117
if: success() || failure()
96118
run: .github/scripts/generate-junit-reports.sc jvm-tests-1 'Scala CLI JVM Tests (1)' test-report.xml out/
@@ -1615,6 +1637,7 @@ jobs:
16151637
publish:
16161638
needs:
16171639
- unit-tests
1640+
- jvm-bootstrapped-tests
16181641
- jvm-tests-1
16191642
- jvm-tests-2
16201643
- jvm-tests-3
@@ -1702,6 +1725,7 @@ jobs:
17021725
timeout-minutes: 20
17031726
needs:
17041727
- unit-tests
1728+
- jvm-bootstrapped-tests
17051729
- jvm-tests-1
17061730
- jvm-tests-2
17071731
- jvm-tests-3

modules/integration/src/test/scala/scala/cli/integration/CoursierScalaInstallationTestHelper.scala

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,9 @@ trait CoursierScalaInstallationTestHelper {
6060
val scalaScript = execLine match { case scriptPathRegex(extractedPath) => extractedPath }
6161
val scalaScriptPath = os.Path(scalaScript)
6262
val lineToChange = "eval \"${SCALA_CLI_CMD_BASH[@]}\" \\"
63-
// FIXME: the way the scala script calls the launcher currently ignores the --debug flag
64-
val newContent = os.read(scalaScriptPath).replace(
65-
lineToChange,
66-
s"""SCALA_CLI_CMD_BASH=(\"\\\"${TestUtil.cliPath}\\\"\")
67-
|$lineToChange""".stripMargin
68-
)
63+
val changedLine =
64+
s"""eval \"${TestUtil.cli.mkString(s"\" \\${System.lineSeparator()}")}\" \\"""
65+
val newContent = os.read(scalaScriptPath).replace(lineToChange, changedLine)
6966
os.write.over(scalaScriptPath, newContent)
7067
scalaBinary -> scalaScriptPath
7168
}

modules/integration/src/test/scala/scala/cli/integration/StandaloneLauncherTests.scala

Lines changed: 0 additions & 32 deletions
This file was deleted.

0 commit comments

Comments
 (0)