Skip to content

Commit 80134e7

Browse files
committed
Run reporter on tests failure
1 parent 6d4ba5c commit 80134e7

6 files changed

Lines changed: 23 additions & 4 deletions

File tree

.github/workflows/bld.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,13 @@ jobs:
4242
- name: Download dependencies
4343
run: ./bld download
4444

45+
- name: Compile source code
46+
run: ./bld compile
47+
4548
- name: Run tests
46-
run: ./bld compile test
49+
continue-on-error: true
50+
run: ./bld test
51+
52+
- name: Run reporter
53+
if: ${{ failure() }}
54+
run: ./bld reporter --all

.idea/misc.xml

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/pmd.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
<rule ref="category/java/bestpractices.xml">
99
<exclude name="AvoidPrintStackTrace"/>
1010
<exclude name="GuardLogStatement"/>
11+
<exclude name="RelianceOnDefaultCharset"/>
1112
<exclude name="UnitTestContainsTooManyAsserts"/>
1213
<exclude name="UnitTestShouldUseTestAnnotation"/>
1314
</rule>

examples/lib/bld/bld-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ bld.downloadExtensionJavadoc=false
22
bld.downloadExtensionSources=true
33
bld.downloadLocation=
44
bld.extension-boot=com.uwyn.rife2:bld-spring-boot:1.0.3
5-
bld.repositories=MAVEN_LOCAL,MAVEN_CENTRAL,RIFE2_SNAPSHOTS,RIFE2_RELEASES
5+
bld.repositories=MAVEN_LOCAL,RIFE2_RELEASES,MAVEN_CENTRAL,RIFE2_SNAPSHOTS
66
bld.sourceDirectories=
77
bld.version=2.3.0

lib/bld/bld-wrapper.properties

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ bld.downloadExtensionJavadoc=false
22
bld.downloadExtensionSources=true
33
bld.downloadLocation=
44
bld.extension-exec=com.uwyn.rife2:bld-exec:1.0.5
5-
bld.repositories=MAVEN_CENTRAL,MAVEN_LOCAL,RIFE2_RELEASES
65
bld.extension-pmd=com.uwyn.rife2:bld-pmd:1.3.3
6+
bld.extension-reporter=com.uwyn.rife2:bld-junit-reporter:0.9.1
7+
bld.repositories=MAVEN_LOCAL,RIFE2_RELEASES,MAVEN_CENTRAL
78
bld.sourceDirectories=
89
bld.version=2.3.0

src/bld/java/rife/bld/extension/SpringBootBuild.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public SpringBootBuild() {
4949
.include(dependency("com.uwyn.rife2", "bld", version(2, 3, 0)));
5050
scope(test)
5151
.include(dependency("com.uwyn.rife2", "bld-extensions-testing-helpers",
52-
version(0, 9, 0, "SNAPSHOT")))
52+
version(0, 9, 3, "SNAPSHOT")))
5353
.include(dependency("org.junit.jupiter", "junit-jupiter",
5454
version(5, 13, 4)))
5555
.include(dependency("org.junit.platform", "junit-platform-console-standalone",
@@ -103,6 +103,14 @@ public void pmd() throws Exception {
103103
.execute();
104104
}
105105

106+
@BuildCommand(summary = "Runs the JUnit reporter")
107+
public void reporter() throws Exception {
108+
new JUnitReporterOperation()
109+
.fromProject(this)
110+
.failOnSummary(true)
111+
.execute();
112+
}
113+
106114
@Override
107115
public void test() throws Exception {
108116
var testResultsDir = "build/test-results/test/";

0 commit comments

Comments
 (0)