Skip to content

Commit c6e2b40

Browse files
authored
Fix generating test reports for failed suites (#2564)
1 parent e5fd64d commit c6e2b40

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

.github/workflows/ci.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ jobs:
4242
- name: Unit tests
4343
run: ./mill -i unitTests
4444
- name: Convert Mill test reports to JUnit XML format
45+
if: success() || failure()
4546
run: .github/scripts/generate-junit-reports.sc unit-tests 'Scala CLI Unit Tests' test-report.xml out/
4647
- name: Upload test report
4748
uses: actions/upload-artifact@v3
@@ -66,8 +67,10 @@ jobs:
6667
env:
6768
SCALA_CLI_IT_GROUP: 1
6869
- name: Fat jar integration test
70+
if: success() || failure()
6971
run: ./mill integration.test.jvmBootstrapped 'scala.cli.integration.StandaloneLauncherTests.*'
7072
- name: Convert Mill test reports to JUnit XML format
73+
if: success() || failure()
7174
run: .github/scripts/generate-junit-reports.sc jvm-tests-1 'Scala CLI JVM Tests (1)' test-report.xml out/
7275
- name: Upload test report
7376
uses: actions/upload-artifact@v3
@@ -92,6 +95,7 @@ jobs:
9295
env:
9396
SCALA_CLI_IT_GROUP: 2
9497
- name: Convert Mill test reports to JUnit XML format
98+
if: success() || failure()
9599
run: .github/scripts/generate-junit-reports.sc jvm-tests-2 'Scala CLI JVM Tests (2)' test-report.xml out/
96100
- name: Upload test report
97101
uses: actions/upload-artifact@v3
@@ -116,6 +120,7 @@ jobs:
116120
env:
117121
SCALA_CLI_IT_GROUP: 3
118122
- name: Convert Mill test reports to JUnit XML format
123+
if: success() || failure()
119124
run: .github/scripts/generate-junit-reports.sc jvm-tests-3 'Scala CLI JVM Tests (3)' test-report.xml out/
120125
- name: Upload test report
121126
uses: actions/upload-artifact@v3
@@ -174,6 +179,7 @@ jobs:
174179
SCALA_CLI_IT_GROUP: 1
175180
SCALA_CLI_SODIUM_JNI_ALLOW: false
176181
- name: Convert Mill test reports to JUnit XML format
182+
if: success() || failure()
177183
run: .github/scripts/generate-junit-reports.sc linux-tests-1 'Scala CLI Linux Tests (1)' test-report.xml out/
178184
- name: Upload test report
179185
uses: actions/upload-artifact@v3
@@ -206,6 +212,7 @@ jobs:
206212
SCALA_CLI_IT_GROUP: 2
207213
SCALA_CLI_SODIUM_JNI_ALLOW: false
208214
- name: Convert Mill test reports to JUnit XML format
215+
if: success() || failure()
209216
run: .github/scripts/generate-junit-reports.sc linux-tests-2 'Scala CLI Linux Tests (2)' test-report.xml out/
210217
- name: Upload test report
211218
uses: actions/upload-artifact@v3
@@ -238,6 +245,7 @@ jobs:
238245
SCALA_CLI_IT_GROUP: 3
239246
SCALA_CLI_SODIUM_JNI_ALLOW: false
240247
- name: Convert Mill test reports to JUnit XML format
248+
if: success() || failure()
241249
run: .github/scripts/generate-junit-reports.sc linux-tests-3 'Scala CLI Linux Tests (3)' test-report.xml out/
242250
- name: Upload test report
243251
uses: actions/upload-artifact@v3
@@ -319,6 +327,7 @@ jobs:
319327
SCALA_CLI_IT_GROUP: 1
320328
SCALA_CLI_SODIUM_JNI_ALLOW: false
321329
- name: Convert Mill test reports to JUnit XML format
330+
if: success() || failure()
322331
run: .github/scripts/generate-junit-reports.sc macos-tests-1 'Scala CLI MacOS Tests (1)' test-report.xml out/
323332
- name: Upload test report
324333
uses: actions/upload-artifact@v3
@@ -351,6 +360,7 @@ jobs:
351360
SCALA_CLI_IT_GROUP: 2
352361
SCALA_CLI_SODIUM_JNI_ALLOW: false
353362
- name: Convert Mill test reports to JUnit XML format
363+
if: success() || failure()
354364
run: .github/scripts/generate-junit-reports.sc macos-tests-2 'Scala CLI MacOS Tests (2)' test-report.xml out/
355365
- name: Upload test report
356366
uses: actions/upload-artifact@v3
@@ -383,6 +393,7 @@ jobs:
383393
SCALA_CLI_IT_GROUP: 3
384394
SCALA_CLI_SODIUM_JNI_ALLOW: false
385395
- name: Convert Mill test reports to JUnit XML format
396+
if: success() || failure()
386397
run: .github/scripts/generate-junit-reports.sc macos-tests-3 'Scala CLI MacOS Tests (3)' test-report.xml out/
387398
- name: Upload test report
388399
uses: actions/upload-artifact@v3
@@ -444,6 +455,7 @@ jobs:
444455
SCALA_CLI_IT_FORCED_LAUNCHER_DIRECTORY: artifacts/
445456
SCALA_CLI_SODIUM_JNI_ALLOW: false
446457
- name: Convert Mill test reports to JUnit XML format
458+
if: success() || failure()
447459
run: .github/scripts/generate-junit-reports.sc macos-m1-tests 'Scala CLI MacOS M1 Tests' test-report.xml out/
448460
- name: Upload test report
449461
uses: actions/upload-artifact@v3
@@ -515,6 +527,7 @@ jobs:
515527
SCALA_CLI_IT_GROUP: 1
516528
SCALA_CLI_SODIUM_JNI_ALLOW: false
517529
- name: Convert Mill test reports to JUnit XML format
530+
if: success() || failure()
518531
run: scala-cli shebang .github/scripts/generate-junit-reports.sc windows-tests-1 'Scala CLI Windows Tests (1)' test-report.xml out/
519532
- name: Upload test report
520533
uses: actions/upload-artifact@v3
@@ -555,6 +568,7 @@ jobs:
555568
SCALA_CLI_IT_GROUP: 2
556569
SCALA_CLI_SODIUM_JNI_ALLOW: false
557570
- name: Convert Mill test reports to JUnit XML format
571+
if: success() || failure()
558572
run: scala-cli shebang .github/scripts/generate-junit-reports.sc windows-tests-2 'Scala CLI Windows Tests (2)' test-report.xml out/
559573
- name: Upload test report
560574
uses: actions/upload-artifact@v3
@@ -595,6 +609,7 @@ jobs:
595609
SCALA_CLI_IT_GROUP: 3
596610
SCALA_CLI_SODIUM_JNI_ALLOW: false
597611
- name: Convert Mill test reports to JUnit XML format
612+
if: success() || failure()
598613
run: scala-cli shebang .github/scripts/generate-junit-reports.sc windows-tests-3 'Scala CLI Windows Tests (3)' test-report.xml out/
599614
- name: Upload test report
600615
uses: actions/upload-artifact@v3
@@ -652,8 +667,10 @@ jobs:
652667
SCALA_CLI_IT_GROUP: 1
653668
SCALA_CLI_SODIUM_JNI_ALLOW: false
654669
- name: Docker integration tests
670+
if: success() || failure()
655671
run: ./mill integration.docker-slim.test
656672
- name: Convert Mill test reports to JUnit XML format
673+
if: success() || failure()
657674
run: .github/scripts/generate-junit-reports.sc native-mostly-static-tests-1 'Scala CLI Native Mostly Static Tests (1)' test-report.xml out/
658675
- name: Upload test report
659676
uses: actions/upload-artifact@v3
@@ -695,6 +712,7 @@ jobs:
695712
SCALA_CLI_IT_GROUP: 2
696713
SCALA_CLI_SODIUM_JNI_ALLOW: false
697714
- name: Convert Mill test reports to JUnit XML format
715+
if: success() || failure()
698716
run: .github/scripts/generate-junit-reports.sc native-mostly-static-tests-2 'Scala CLI Native Mostly Static Tests (2)' test-report.xml out/
699717
- name: Upload test report
700718
uses: actions/upload-artifact@v3
@@ -727,6 +745,7 @@ jobs:
727745
SCALA_CLI_IT_GROUP: 3
728746
SCALA_CLI_SODIUM_JNI_ALLOW: false
729747
- name: Convert Mill test reports to JUnit XML format
748+
if: success() || failure()
730749
run: .github/scripts/generate-junit-reports.sc native-mostly-static-tests-3 'Scala CLI Native Mostly Static Tests (3)' test-report.xml out/
731750
- name: Upload test report
732751
uses: actions/upload-artifact@v3
@@ -784,8 +803,10 @@ jobs:
784803
SCALA_CLI_IT_GROUP: 1
785804
SCALA_CLI_SODIUM_JNI_ALLOW: false
786805
- name: Docker integration tests
806+
if: success() || failure()
787807
run: ./mill integration.docker.test
788808
- name: Convert Mill test reports to JUnit XML format
809+
if: success() || failure()
789810
run: .github/scripts/generate-junit-reports.sc native-static-tests-1 'Scala CLI Native Static Tests (1)' test-report.xml out/
790811
- name: Upload test report
791812
uses: actions/upload-artifact@v3
@@ -829,6 +850,7 @@ jobs:
829850
SCALA_CLI_IT_GROUP: 2
830851
SCALA_CLI_SODIUM_JNI_ALLOW: false
831852
- name: Convert Mill test reports to JUnit XML format
853+
if: success() || failure()
832854
run: .github/scripts/generate-junit-reports.sc native-static-tests-2 'Scala CLI Native Static Tests (2)' test-report.xml out/
833855
- name: Upload test report
834856
uses: actions/upload-artifact@v3
@@ -863,6 +885,7 @@ jobs:
863885
SCALA_CLI_IT_GROUP: 3
864886
SCALA_CLI_SODIUM_JNI_ALLOW: false
865887
- name: Convert Mill test reports to JUnit XML format
888+
if: success() || failure()
866889
run: .github/scripts/generate-junit-reports.sc native-static-tests-3 'Scala CLI Native Static Tests (3)' test-report.xml out/
867890
- name: Upload test report
868891
uses: actions/upload-artifact@v3
@@ -890,6 +913,7 @@ jobs:
890913
- name: Test documentation
891914
run: ./mill -i docs-tests.test
892915
- name: Convert Mill test reports to JUnit XML format
916+
if: success() || failure()
893917
run: .github/scripts/generate-junit-reports.sc docs-tests 'Scala CLI Docs Tests' test-report.xml out/
894918
- name: Upload test report
895919
uses: actions/upload-artifact@v3

0 commit comments

Comments
 (0)