Skip to content

Commit e262304

Browse files
committed
Re-test with showing standard streams
1 parent ab8da7b commit e262304

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

.github/workflows/test.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,48 @@ jobs:
1818
with:
1919
arguments: test
2020
include-test-report: true
21+
22+
build:
23+
runs-on: ubuntu-latest
24+
25+
steps:
26+
- uses: actions/[email protected]
27+
with:
28+
fetch-depth: 0
29+
30+
- name: Setup Java JDK
31+
uses: actions/[email protected]
32+
with:
33+
java-version: 21
34+
distribution: temurin
35+
36+
- name: Setup gradle
37+
uses: gradle/actions/[email protected]
38+
39+
- name: Run gradle test
40+
run: ./gradlew test
41+
42+
- name: Re-run test with output
43+
if: failure()
44+
run: |
45+
cat <<EOF > ${{ runner.temp }}/test-logging.gradle
46+
allprojects {
47+
tasks.withType(Test).configureEach {
48+
testLogging {
49+
showStandardStreams = true
50+
}
51+
}
52+
}
53+
EOF
54+
55+
- name: Re-run test with output
56+
if: failure()
57+
run: ./gradlew --init-script ${{ runner.temp }}/test-logging.gradle test
58+
59+
- name: Test Report
60+
uses: dorny/[email protected]
61+
if: github.actor == github.repository_owner && inputs.include-test-report && ( success() || failure() ) # run this step even if previous step failed
62+
with:
63+
name: test results
64+
path: build/test-results/test/*.xml
65+
reporter: java-junit

0 commit comments

Comments
 (0)