Skip to content

Commit f064c5f

Browse files
committed
Run 3.lts integration tests in separate jobs
1 parent c8f4db6 commit f064c5f

File tree

4 files changed

+211
-1
lines changed

4 files changed

+211
-1
lines changed

.github/workflows/ci.yml

Lines changed: 207 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,31 @@ jobs:
129129
name: test-results-jvm-tests-3
130130
path: test-report.xml
131131

132+
jvm-tests-4:
133+
timeout-minutes: 120
134+
runs-on: "ubuntu-20.04"
135+
steps:
136+
- uses: actions/checkout@v4
137+
with:
138+
fetch-depth: 0
139+
submodules: true
140+
- uses: VirtusLab/scala-cli-setup@5b1a6c5ca98b5642996812781f6ad9b2d5935f85
141+
with:
142+
jvm: "temurin:17"
143+
- name: JVM integration tests
144+
run: ./mill -i integration.test.jvm
145+
env:
146+
SCALA_CLI_IT_GROUP: 4
147+
- name: Convert Mill test reports to JUnit XML format
148+
if: success() || failure()
149+
run: .github/scripts/generate-junit-reports.sc jvm-tests-4 'Scala CLI JVM Tests (4)' test-report.xml out/
150+
- name: Upload test report
151+
uses: actions/upload-artifact@v3
152+
if: success() || failure()
153+
with:
154+
name: test-results-jvm-tests-4
155+
path: test-report.xml
156+
132157
generate-linux-launcher:
133158
timeout-minutes: 120
134159
runs-on: "ubuntu-20.04"
@@ -254,6 +279,39 @@ jobs:
254279
name: test-results-linux-tests-3
255280
path: test-report.xml
256281

282+
native-linux-tests-4:
283+
needs: generate-linux-launcher
284+
timeout-minutes: 120
285+
runs-on: "ubuntu-20.04"
286+
steps:
287+
- uses: actions/checkout@v4
288+
with:
289+
fetch-depth: 0
290+
submodules: true
291+
- uses: VirtusLab/scala-cli-setup@5b1a6c5ca98b5642996812781f6ad9b2d5935f85
292+
with:
293+
jvm: "temurin:17"
294+
- uses: actions/download-artifact@v3
295+
with:
296+
name: linux-launchers
297+
path: artifacts/
298+
- name: Native integration tests
299+
run: ./mill -i nativeIntegrationTests
300+
env:
301+
UPDATE_GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
302+
SCALA_CLI_IT_FORCED_LAUNCHER_DIRECTORY: artifacts/
303+
SCALA_CLI_IT_GROUP: 4
304+
SCALA_CLI_SODIUM_JNI_ALLOW: false
305+
- name: Convert Mill test reports to JUnit XML format
306+
if: success() || failure()
307+
run: .github/scripts/generate-junit-reports.sc linux-tests-4 'Scala CLI Linux Tests (4)' test-report.xml out/
308+
- name: Upload test report
309+
uses: actions/upload-artifact@v3
310+
if: success() || failure()
311+
with:
312+
name: test-results-linux-tests-4
313+
path: test-report.xml
314+
257315
generate-linux-arm64-native-launcher:
258316
runs-on: "macOS-m1"
259317
if: github.event_name == 'push'
@@ -402,6 +460,39 @@ jobs:
402460
name: test-results-macos-tests-3
403461
path: test-report.xml
404462

463+
native-macos-tests-4:
464+
needs: generate-macos-launcher
465+
timeout-minutes: 120
466+
runs-on: "macOS-13"
467+
steps:
468+
- uses: actions/checkout@v4
469+
with:
470+
fetch-depth: 0
471+
submodules: true
472+
- uses: VirtusLab/scala-cli-setup@5b1a6c5ca98b5642996812781f6ad9b2d5935f85
473+
with:
474+
jvm: "temurin:17"
475+
- uses: actions/download-artifact@v3
476+
with:
477+
name: macos-launchers
478+
path: artifacts/
479+
- name: Native integration tests
480+
run: ./mill -i nativeIntegrationTests
481+
env:
482+
UPDATE_GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
483+
SCALA_CLI_IT_FORCED_LAUNCHER_DIRECTORY: artifacts/
484+
SCALA_CLI_IT_GROUP: 4
485+
SCALA_CLI_SODIUM_JNI_ALLOW: false
486+
- name: Convert Mill test reports to JUnit XML format
487+
if: success() || failure()
488+
run: .github/scripts/generate-junit-reports.sc macos-tests-4 'Scala CLI MacOS Tests (4)' test-report.xml out/
489+
- name: Upload test report
490+
uses: actions/upload-artifact@v3
491+
if: success() || failure()
492+
with:
493+
name: test-results-macos-tests-4
494+
path: test-report.xml
495+
405496
generate-macos-m1-launcher:
406497
timeout-minutes: 120
407498
runs-on: "macOS-m1"
@@ -619,6 +710,47 @@ jobs:
619710
name: test-results-windows-tests-3
620711
path: test-report.xml
621712

713+
native-windows-tests-4:
714+
needs: generate-windows-launcher
715+
timeout-minutes: 120
716+
runs-on: "windows-2019"
717+
steps:
718+
- uses: actions/checkout@v4
719+
with:
720+
fetch-depth: 0
721+
submodules: true
722+
- name: Set up Python
723+
uses: actions/setup-python@v5
724+
with:
725+
python-version: "3.10"
726+
- uses: VirtusLab/scala-cli-setup@5b1a6c5ca98b5642996812781f6ad9b2d5935f85
727+
with:
728+
jvm: "temurin:17"
729+
- name: Get latest coursier launcher
730+
run: .github/scripts/get-latest-cs.sh
731+
shell: bash
732+
- uses: actions/download-artifact@v3
733+
with:
734+
name: windows-launchers
735+
path: artifacts/
736+
- name: Native integration tests
737+
run: ./mill -i nativeIntegrationTests
738+
env:
739+
COURSIER_JNI: force
740+
UPDATE_GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
741+
SCALA_CLI_IT_FORCED_LAUNCHER_DIRECTORY: artifacts/
742+
SCALA_CLI_IT_GROUP: 4
743+
SCALA_CLI_SODIUM_JNI_ALLOW: false
744+
- name: Convert Mill test reports to JUnit XML format
745+
if: success() || failure()
746+
run: scala-cli shebang .github/scripts/generate-junit-reports.sc windows-tests-4 'Scala CLI Windows Tests (4)' test-report.xml out/
747+
- name: Upload test report
748+
uses: actions/upload-artifact@v3
749+
if: success() || failure()
750+
with:
751+
name: test-results-windows-tests-4
752+
path: test-report.xml
753+
622754
generate-mostly-static-launcher:
623755
timeout-minutes: 120
624756
runs-on: ubuntu-20.04
@@ -755,6 +887,39 @@ jobs:
755887
name: test-results-native-mostly-static-tests-3
756888
path: test-report.xml
757889

890+
native-mostly-static-tests-4:
891+
needs: generate-mostly-static-launcher
892+
timeout-minutes: 120
893+
runs-on: ubuntu-20.04
894+
steps:
895+
- uses: actions/checkout@v4
896+
with:
897+
fetch-depth: 0
898+
submodules: true
899+
- uses: VirtusLab/scala-cli-setup@5b1a6c5ca98b5642996812781f6ad9b2d5935f85
900+
with:
901+
jvm: "temurin:17"
902+
- uses: actions/download-artifact@v3
903+
with:
904+
name: mostly-static-launchers
905+
path: artifacts/
906+
- name: Native integration tests
907+
run: ./mill -i integration.test.nativeMostlyStatic
908+
env:
909+
UPDATE_GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
910+
SCALA_CLI_IT_FORCED_LAUNCHER_DIRECTORY: artifacts/
911+
SCALA_CLI_IT_GROUP: 4
912+
SCALA_CLI_SODIUM_JNI_ALLOW: false
913+
- name: Convert Mill test reports to JUnit XML format
914+
if: success() || failure()
915+
run: .github/scripts/generate-junit-reports.sc native-mostly-static-tests-4 'Scala CLI Native Mostly Static Tests (4)' test-report.xml out/
916+
- name: Upload test report
917+
uses: actions/upload-artifact@v3
918+
if: success() || failure()
919+
with:
920+
name: test-results-native-mostly-static-tests-4
921+
path: test-report.xml
922+
758923
generate-static-launcher:
759924
timeout-minutes: 120
760925
runs-on: ubuntu-20.04
@@ -895,6 +1060,41 @@ jobs:
8951060
name: test-results-native-static-tests-3
8961061
path: test-report.xml
8971062

1063+
native-static-tests-4:
1064+
needs: generate-static-launcher
1065+
timeout-minutes: 120
1066+
runs-on: ubuntu-20.04
1067+
steps:
1068+
- uses: actions/checkout@v4
1069+
with:
1070+
fetch-depth: 0
1071+
submodules: true
1072+
- uses: VirtusLab/scala-cli-setup@5b1a6c5ca98b5642996812781f6ad9b2d5935f85
1073+
with:
1074+
jvm: "temurin:17"
1075+
- uses: actions/download-artifact@v3
1076+
with:
1077+
name: static-launchers
1078+
path: artifacts/
1079+
- name: Build docker image
1080+
run: .github/scripts/generate-docker-image.sh
1081+
- name: Native integration tests
1082+
run: ./mill -i integration.test.nativeStatic
1083+
env:
1084+
UPDATE_GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1085+
SCALA_CLI_IT_FORCED_LAUNCHER_DIRECTORY: artifacts/
1086+
SCALA_CLI_IT_GROUP: 4
1087+
SCALA_CLI_SODIUM_JNI_ALLOW: false
1088+
- name: Convert Mill test reports to JUnit XML format
1089+
if: success() || failure()
1090+
run: .github/scripts/generate-junit-reports.sc native-static-tests-4 'Scala CLI Native Static Tests (4)' test-report.xml out/
1091+
- name: Upload test report
1092+
uses: actions/upload-artifact@v3
1093+
if: success() || failure()
1094+
with:
1095+
name: test-results-native-static-tests-4
1096+
path: test-report.xml
1097+
8981098
docs-tests:
8991099
# for now, let's run those tests only on ubuntu
9001100
runs-on: ubuntu-20.04
@@ -1039,7 +1239,7 @@ jobs:
10391239
retention-days: 2
10401240

10411241
publish:
1042-
needs: [unit-tests, jvm-tests-1, jvm-tests-2, jvm-tests-3, format, checks, reference-doc]
1242+
needs: [unit-tests, jvm-tests-1, jvm-tests-2, jvm-tests-3, jvm-tests-4, format, checks, reference-doc]
10431243
if: github.event_name == 'push' && github.repository == 'VirtusLab/scala-cli'
10441244
runs-on: ubuntu-20.04
10451245
steps:
@@ -1082,22 +1282,28 @@ jobs:
10821282
- jvm-tests-1
10831283
- jvm-tests-2
10841284
- jvm-tests-3
1285+
- jvm-tests-4
10851286
- native-linux-tests-1
10861287
- native-linux-tests-2
10871288
- native-linux-tests-3
1289+
- native-linux-tests-4
10881290
- native-macos-tests-1
10891291
- native-macos-tests-2
10901292
- native-macos-tests-3
1293+
- native-macos-tests-4
10911294
- native-macos-m1-tests
10921295
- native-windows-tests-1
10931296
- native-windows-tests-2
10941297
- native-windows-tests-3
1298+
- native-windows-tests-4
10951299
- native-mostly-static-tests-1
10961300
- native-mostly-static-tests-2
10971301
- native-mostly-static-tests-3
1302+
- native-mostly-static-tests-4
10981303
- native-static-tests-1
10991304
- native-static-tests-2
11001305
- native-static-tests-3
1306+
- native-static-tests-4
11011307
- vc-redist
11021308
- format
11031309
- checks

build.sc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -958,6 +958,7 @@ trait CliIntegration extends SbtModule with ScalaCliPublishModule with HasTests
958958
| def scala212 = "${Scala.scala212}"
959959
| def scala213 = "${Scala.scala213}"
960960
| def scalaSnapshot213 = "${TestDeps.scalaSnapshot213}"
961+
| def scala3LtsPrefix = "${Scala.scala3LtsPrefix}"
961962
| def scala3Lts = "${Scala.scala3Lts}"
962963
| def scala3Next = "${Scala.scala3Next}"
963964
| def defaultScala = "${Scala.defaultUser}"

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,6 @@ object ScalaCliSuite {
3434
case object First extends TestGroup(1)
3535
case object Second extends TestGroup(2)
3636
case object Third extends TestGroup(3)
37+
case object Fourth extends TestGroup(4)
3738
}
3839
}

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ trait TestScalaVersionArgs extends ScalaCliSuite { _: TestScalaVersion =>
66
override def group: ScalaCliSuite.TestGroup =
77
if (actualScalaVersion.startsWith("2.12.")) ScalaCliSuite.TestGroup.Third
88
else if (actualScalaVersion.startsWith("2.13.")) ScalaCliSuite.TestGroup.Second
9+
else if (actualScalaVersion.startsWith(Constants.scala3LtsPrefix))
10+
ScalaCliSuite.TestGroup.Fourth
911
else ScalaCliSuite.TestGroup.First
1012

1113
lazy val scalaVersionArgs: Seq[String] = scalaVersionOpt match {

0 commit comments

Comments
 (0)