Skip to content

Commit 91aa165

Browse files
authored
ci: generate JUnit test summary (#1740)
1 parent 7fa4395 commit 91aa165

File tree

5 files changed

+63
-4
lines changed

5 files changed

+63
-4
lines changed

.github/workflows/pull_request.yml

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: "Base Workflow"
22

3+
env:
4+
NODE_OPTIONS: "--max_old_space_size=4096"
5+
36
on:
47
push:
58
branches: [main]
@@ -44,6 +47,14 @@ jobs:
4447

4548
- name: Build and test timefold-solver
4649
run: mvn -B verify
50+
51+
- name: Test Summary
52+
uses: test-summary/action@2920bc1b1b377c787227b204af6981e8f41bbef3
53+
with:
54+
paths: "**/TEST-*.xml"
55+
show: "fail"
56+
if: always()
57+
4758
# Exists to check long-running goals, such as docs.
4859
# Tests are skipped as there is plenty of CI that runs them.
4960
java_full:
@@ -83,6 +94,12 @@ jobs:
8394
run: |
8495
cd spring-integration
8596
mvn -B verify
97+
- name: Test Summary
98+
uses: test-summary/action@2920bc1b1b377c787227b204af6981e8f41bbef3
99+
with:
100+
paths: "**/TEST-*.xml"
101+
show: "fail"
102+
if: always()
86103
spring_boot_3_4_x:
87104
name: "Spring Boot 3.4.x"
88105
runs-on: ubuntu-latest
@@ -104,6 +121,12 @@ jobs:
104121
run: |
105122
cd spring-integration
106123
mvn -B verify
124+
- name: Test Summary
125+
uses: test-summary/action@2920bc1b1b377c787227b204af6981e8f41bbef3
126+
with:
127+
paths: "**/TEST-*.xml"
128+
show: "fail"
129+
if: always()
107130

108131
native:
109132
name: "Native Image"
@@ -131,7 +154,6 @@ jobs:
131154
with:
132155
java-version: ${{matrix.java-version}}
133156
distribution: 'graalvm-community'
134-
components: 'native-image'
135157
github-token: ${{ secrets.GITHUB_TOKEN }}
136158
cache: 'maven'
137159

@@ -142,3 +164,10 @@ jobs:
142164
run: |
143165
cd ${{matrix.module}}
144166
mvn -B -Dnative verify
167+
168+
- name: Test Summary
169+
uses: test-summary/action@2920bc1b1b377c787227b204af6981e8f41bbef3
170+
with:
171+
paths: "**/TEST-*.xml"
172+
show: "fail"
173+
if: always()

.github/workflows/pull_request_quickstarts.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: Quickstarts Workflow
22

3+
env:
4+
NODE_OPTIONS: "--max_old_space_size=4096"
5+
36
on:
47
push:
58
branches: [main]
@@ -67,4 +70,10 @@ jobs:
6770
- name: Build and test timefold-quickstarts
6871
working-directory: ./timefold-quickstarts
6972
shell: bash
70-
run: mvn -B clean verify
73+
run: mvn -B clean verify
74+
- name: Test Summary
75+
uses: test-summary/action@2920bc1b1b377c787227b204af6981e8f41bbef3
76+
with:
77+
paths: "**/TEST-*.xml"
78+
show: "fail"
79+
if: always()

.github/workflows/pull_request_secure.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
# or that there is explicit approval for their jobs to run.
55
name: Secured Workflow
66

7+
env:
8+
NODE_OPTIONS: "--max_old_space_size=4096"
9+
710
on:
811
push:
912
branches: [ main ]
@@ -133,6 +136,12 @@ jobs:
133136
working-directory: ./timefold-solver-benchmarks
134137
shell: bash
135138
run: mvn -B -DskipJMH clean verify
139+
- name: Test Summary
140+
uses: test-summary/action@2920bc1b1b377c787227b204af6981e8f41bbef3
141+
with:
142+
paths: "**/TEST-*.xml"
143+
show: "fail"
144+
if: always()
136145
enterprise-java:
137146
needs: approval_required
138147
name: Enterprise Edition (Java)
@@ -187,6 +196,12 @@ jobs:
187196
working-directory: ./timefold-solver-enterprise
188197
shell: bash
189198
run: mvn -B clean verify
199+
- name: Test Summary
200+
uses: test-summary/action@2920bc1b1b377c787227b204af6981e8f41bbef3
201+
with:
202+
paths: "**/TEST-*.xml"
203+
show: "fail"
204+
if: always()
190205

191206
build_documentation:
192207
runs-on: ubuntu-latest

build/build-parent/pom.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -555,10 +555,16 @@
555555
<plugin>
556556
<artifactId>maven-surefire-plugin</artifactId>
557557
<version>${version.surefire.plugin}</version>
558+
<configuration>
559+
<redirectTestOutputToFile>true</redirectTestOutputToFile>
560+
</configuration>
558561
</plugin>
559562
<plugin>
560563
<artifactId>maven-failsafe-plugin</artifactId>
561564
<version>${version.surefire.plugin}</version>
565+
<configuration>
566+
<redirectTestOutputToFile>true</redirectTestOutputToFile>
567+
</configuration>
562568
</plugin>
563569
<!-- Do not move to full profile. Otherwise upstream dependency changes can break our build without CI catching it. -->
564570
<plugin>

core/src/test/resources/logback-test.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
</appender>
1010

1111
<!-- To override the info log level from the command line, use the VM option "-Dlogback.level.ai.timefold.solver=trace" -->
12-
<logger name="ai.timefold.solver" level="${logback.level.ai.timefold.solver:-warn}"/>
12+
<logger name="ai.timefold.solver" level="${logback.level.ai.timefold.solver:-debug}"/>
1313
<!-- Don't pollute the test log with a stacktrace -->
1414
<logger name="ai.timefold.solver.benchmark.impl.DefaultPlannerBenchmark.singleBenchmarkRunnerException" level="error"/>
1515

16-
<root level="warn">
16+
<root level="debug">
1717
<appender-ref ref="consoleAppender" />
1818
</root>
1919

0 commit comments

Comments
 (0)