Skip to content

Commit c05e9bd

Browse files
authored
Run integration tests for the latest Scala 3 Next RC (#2824)
* Run integration tests for the Scala 3 Next RC version * Add separate integration test jobs for Scala 3 Next RC tests
1 parent a83779e commit c05e9bd

16 files changed

+251
-3
lines changed

.github/workflows/ci.yml

Lines changed: 207 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,31 @@ jobs:
154154
name: test-results-jvm-tests-4
155155
path: test-report.xml
156156

157+
jvm-tests-5:
158+
timeout-minutes: 120
159+
runs-on: "ubuntu-20.04"
160+
steps:
161+
- uses: actions/checkout@v4
162+
with:
163+
fetch-depth: 0
164+
submodules: true
165+
- uses: VirtusLab/scala-cli-setup@5b1a6c5ca98b5642996812781f6ad9b2d5935f85
166+
with:
167+
jvm: "temurin:17"
168+
- name: JVM integration tests
169+
run: ./mill -i integration.test.jvm
170+
env:
171+
SCALA_CLI_IT_GROUP: 5
172+
- name: Convert Mill test reports to JUnit XML format
173+
if: success() || failure()
174+
run: .github/scripts/generate-junit-reports.sc jvm-tests-5 'Scala CLI JVM Tests (5)' test-report.xml out/
175+
- name: Upload test report
176+
uses: actions/upload-artifact@v3
177+
if: success() || failure()
178+
with:
179+
name: test-results-jvm-tests-5
180+
path: test-report.xml
181+
157182
generate-linux-launcher:
158183
timeout-minutes: 120
159184
runs-on: "ubuntu-20.04"
@@ -312,6 +337,39 @@ jobs:
312337
name: test-results-linux-tests-4
313338
path: test-report.xml
314339

340+
native-linux-tests-5:
341+
needs: generate-linux-launcher
342+
timeout-minutes: 120
343+
runs-on: "ubuntu-20.04"
344+
steps:
345+
- uses: actions/checkout@v4
346+
with:
347+
fetch-depth: 0
348+
submodules: true
349+
- uses: VirtusLab/scala-cli-setup@5b1a6c5ca98b5642996812781f6ad9b2d5935f85
350+
with:
351+
jvm: "temurin:17"
352+
- uses: actions/download-artifact@v3
353+
with:
354+
name: linux-launchers
355+
path: artifacts/
356+
- name: Native integration tests
357+
run: ./mill -i nativeIntegrationTests
358+
env:
359+
UPDATE_GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
360+
SCALA_CLI_IT_FORCED_LAUNCHER_DIRECTORY: artifacts/
361+
SCALA_CLI_IT_GROUP: 5
362+
SCALA_CLI_SODIUM_JNI_ALLOW: false
363+
- name: Convert Mill test reports to JUnit XML format
364+
if: success() || failure()
365+
run: .github/scripts/generate-junit-reports.sc linux-tests-5 'Scala CLI Linux Tests (5)' test-report.xml out/
366+
- name: Upload test report
367+
uses: actions/upload-artifact@v3
368+
if: success() || failure()
369+
with:
370+
name: test-results-linux-tests-5
371+
path: test-report.xml
372+
315373
generate-linux-arm64-native-launcher:
316374
runs-on: "macOS-m1"
317375
if: github.event_name == 'push'
@@ -493,6 +551,39 @@ jobs:
493551
name: test-results-macos-tests-4
494552
path: test-report.xml
495553

554+
native-macos-tests-5:
555+
needs: generate-macos-launcher
556+
timeout-minutes: 120
557+
runs-on: "macOS-13"
558+
steps:
559+
- uses: actions/checkout@v4
560+
with:
561+
fetch-depth: 0
562+
submodules: true
563+
- uses: VirtusLab/scala-cli-setup@5b1a6c5ca98b5642996812781f6ad9b2d5935f85
564+
with:
565+
jvm: "temurin:17"
566+
- uses: actions/download-artifact@v3
567+
with:
568+
name: macos-launchers
569+
path: artifacts/
570+
- name: Native integration tests
571+
run: ./mill -i nativeIntegrationTests
572+
env:
573+
UPDATE_GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
574+
SCALA_CLI_IT_FORCED_LAUNCHER_DIRECTORY: artifacts/
575+
SCALA_CLI_IT_GROUP: 5
576+
SCALA_CLI_SODIUM_JNI_ALLOW: false
577+
- name: Convert Mill test reports to JUnit XML format
578+
if: success() || failure()
579+
run: .github/scripts/generate-junit-reports.sc macos-tests-5 'Scala CLI MacOS Tests (5)' test-report.xml out/
580+
- name: Upload test report
581+
uses: actions/upload-artifact@v3
582+
if: success() || failure()
583+
with:
584+
name: test-results-macos-tests-5
585+
path: test-report.xml
586+
496587
generate-macos-m1-launcher:
497588
timeout-minutes: 120
498589
runs-on: "macOS-m1"
@@ -751,6 +842,47 @@ jobs:
751842
name: test-results-windows-tests-4
752843
path: test-report.xml
753844

845+
native-windows-tests-5:
846+
needs: generate-windows-launcher
847+
timeout-minutes: 120
848+
runs-on: "windows-2019"
849+
steps:
850+
- uses: actions/checkout@v4
851+
with:
852+
fetch-depth: 0
853+
submodules: true
854+
- name: Set up Python
855+
uses: actions/setup-python@v5
856+
with:
857+
python-version: "3.10"
858+
- uses: VirtusLab/scala-cli-setup@5b1a6c5ca98b5642996812781f6ad9b2d5935f85
859+
with:
860+
jvm: "temurin:17"
861+
- name: Get latest coursier launcher
862+
run: .github/scripts/get-latest-cs.sh
863+
shell: bash
864+
- uses: actions/download-artifact@v3
865+
with:
866+
name: windows-launchers
867+
path: artifacts/
868+
- name: Native integration tests
869+
run: ./mill -i nativeIntegrationTests
870+
env:
871+
COURSIER_JNI: force
872+
UPDATE_GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
873+
SCALA_CLI_IT_FORCED_LAUNCHER_DIRECTORY: artifacts/
874+
SCALA_CLI_IT_GROUP: 5
875+
SCALA_CLI_SODIUM_JNI_ALLOW: false
876+
- name: Convert Mill test reports to JUnit XML format
877+
if: success() || failure()
878+
run: scala-cli shebang .github/scripts/generate-junit-reports.sc windows-tests-5 'Scala CLI Windows Tests (5)' test-report.xml out/
879+
- name: Upload test report
880+
uses: actions/upload-artifact@v3
881+
if: success() || failure()
882+
with:
883+
name: test-results-windows-tests-5
884+
path: test-report.xml
885+
754886
generate-mostly-static-launcher:
755887
timeout-minutes: 120
756888
runs-on: ubuntu-20.04
@@ -920,6 +1052,40 @@ jobs:
9201052
name: test-results-native-mostly-static-tests-4
9211053
path: test-report.xml
9221054

1055+
native-mostly-static-tests-5:
1056+
needs: generate-mostly-static-launcher
1057+
timeout-minutes: 120
1058+
runs-on: ubuntu-20.04
1059+
steps:
1060+
- uses: actions/checkout@v4
1061+
with:
1062+
fetch-depth: 0
1063+
submodules: true
1064+
- uses: VirtusLab/scala-cli-setup@5b1a6c5ca98b5642996812781f6ad9b2d5935f85
1065+
with:
1066+
jvm: "temurin:17"
1067+
- uses: actions/download-artifact@v3
1068+
with:
1069+
name: mostly-static-launchers
1070+
path: artifacts/
1071+
- name: Native integration tests
1072+
run: ./mill -i integration.test.nativeMostlyStatic
1073+
env:
1074+
UPDATE_GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1075+
SCALA_CLI_IT_FORCED_LAUNCHER_DIRECTORY: artifacts/
1076+
SCALA_CLI_IT_GROUP: 5
1077+
SCALA_CLI_SODIUM_JNI_ALLOW: false
1078+
- name: Convert Mill test reports to JUnit XML format
1079+
if: success() || failure()
1080+
run: .github/scripts/generate-junit-reports.sc native-mostly-static-tests-5 'Scala CLI Native Mostly Static Tests (5)' test-report.xml out/
1081+
- name: Upload test report
1082+
uses: actions/upload-artifact@v3
1083+
if: success() || failure()
1084+
with:
1085+
name: test-results-native-mostly-static-tests-5
1086+
path: test-report.xml
1087+
1088+
9231089
generate-static-launcher:
9241090
timeout-minutes: 120
9251091
runs-on: ubuntu-20.04
@@ -1095,6 +1261,41 @@ jobs:
10951261
name: test-results-native-static-tests-4
10961262
path: test-report.xml
10971263

1264+
native-static-tests-5:
1265+
needs: generate-static-launcher
1266+
timeout-minutes: 120
1267+
runs-on: ubuntu-20.04
1268+
steps:
1269+
- uses: actions/checkout@v4
1270+
with:
1271+
fetch-depth: 0
1272+
submodules: true
1273+
- uses: VirtusLab/scala-cli-setup@5b1a6c5ca98b5642996812781f6ad9b2d5935f85
1274+
with:
1275+
jvm: "temurin:17"
1276+
- uses: actions/download-artifact@v3
1277+
with:
1278+
name: static-launchers
1279+
path: artifacts/
1280+
- name: Build docker image
1281+
run: .github/scripts/generate-docker-image.sh
1282+
- name: Native integration tests
1283+
run: ./mill -i integration.test.nativeStatic
1284+
env:
1285+
UPDATE_GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1286+
SCALA_CLI_IT_FORCED_LAUNCHER_DIRECTORY: artifacts/
1287+
SCALA_CLI_IT_GROUP: 5
1288+
SCALA_CLI_SODIUM_JNI_ALLOW: false
1289+
- name: Convert Mill test reports to JUnit XML format
1290+
if: success() || failure()
1291+
run: .github/scripts/generate-junit-reports.sc native-static-tests-5 'Scala CLI Native Static Tests (5)' test-report.xml out/
1292+
- name: Upload test report
1293+
uses: actions/upload-artifact@v3
1294+
if: success() || failure()
1295+
with:
1296+
name: test-results-native-static-tests-5
1297+
path: test-report.xml
1298+
10981299
docs-tests:
10991300
# for now, let's run those tests only on ubuntu
11001301
runs-on: ubuntu-20.04
@@ -1283,27 +1484,33 @@ jobs:
12831484
- jvm-tests-2
12841485
- jvm-tests-3
12851486
- jvm-tests-4
1487+
- jvm-tests-5
12861488
- native-linux-tests-1
12871489
- native-linux-tests-2
12881490
- native-linux-tests-3
12891491
- native-linux-tests-4
1492+
- native-linux-tests-5
12901493
- native-macos-tests-1
12911494
- native-macos-tests-2
12921495
- native-macos-tests-3
12931496
- native-macos-tests-4
1497+
- native-macos-tests-5
12941498
- native-macos-m1-tests
12951499
- native-windows-tests-1
12961500
- native-windows-tests-2
12971501
- native-windows-tests-3
12981502
- native-windows-tests-4
1503+
- native-windows-tests-5
12991504
- native-mostly-static-tests-1
13001505
- native-mostly-static-tests-2
13011506
- native-mostly-static-tests-3
13021507
- native-mostly-static-tests-4
1508+
- native-mostly-static-tests-5
13031509
- native-static-tests-1
13041510
- native-static-tests-2
13051511
- native-static-tests-3
13061512
- native-static-tests-4
1513+
- native-static-tests-5
13071514
- vc-redist
13081515
- format
13091516
- checks

build.sc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -969,6 +969,7 @@ trait CliIntegration extends SbtModule with ScalaCliPublishModule with HasTests
969969
| def scalaSnapshot213 = "${TestDeps.scalaSnapshot213}"
970970
| def scala3LtsPrefix = "${Scala.scala3LtsPrefix}"
971971
| def scala3Lts = "${Scala.scala3Lts}"
972+
| def scala3NextRc = "${Scala.scala3NextRc}"
972973
| def scala3Next = "${Scala.scala3Next}"
973974
| def defaultScala = "${Scala.defaultUser}"
974975
| def defaultScalafmtVersion = "${Deps.scalafmtCli.dep.version}"
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
package scala.cli.integration
2+
3+
class BspTests3NextRc extends BspTestDefinitions with Test3NextRc
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
package scala.cli.integration
2+
3+
class CompileTests3NextRc extends CompileTestDefinitions with Test3NextRc
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
package scala.cli.integration
2+
3+
class DocTests3NextRc extends DocTestDefinitions with Test3NextRc
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
package scala.cli.integration
2+
3+
class ExportMillTests3NextRc extends ExportMillTestDefinitions with Test3NextRc
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
package scala.cli.integration
2+
3+
class ExportSbtTests3NextRc extends ExportSbtTestDefinitions with Test3NextRc
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
package scala.cli.integration
2+
3+
class PackageTests3NextRc extends PackageTestDefinitions with Test3NextRc
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
package scala.cli.integration
2+
3+
class PublishLocalTests3NextRc extends PublishLocalTestDefinitions with Test3NextRc
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
package scala.cli.integration
2+
3+
class PublishTests3NextRc extends PublishTestDefinitions with Test3NextRc

0 commit comments

Comments
 (0)