Skip to content

Commit 86b8b26

Browse files
authored
.github/workflows: publish test results for failed job
The GitHub Actions Linux Testing only reports limited information (can not see full stacktrace, time consumed, or stderr from child threads) when unit tests fail. Adding a step to upload the test report to Artifacts if the test fails. If the test is successful, no artifacts will be uploaded.
1 parent 24e345c commit 86b8b26

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Diff for: .github/workflows/testing.yml

+7
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,13 @@ jobs:
5353

5454
- name: Build
5555
run: buildscripts/kokoro/unix.sh
56+
- name: Post Failure Upload Test Reports to Artifacts
57+
if: ${{ failure() }}
58+
uses: actions/upload-artifact@v2
59+
with:
60+
name: Test Reports (JRE ${{ matrix.jre }})
61+
path: ./*/build/reports/tests/**
62+
retention-days: 14
5663
- name: Check for modified codegen
5764
run: test -z "$(git status --porcelain)" || (git status && echo Error Working directory is not clean. Forget to commit generated files? && false)
5865

0 commit comments

Comments
 (0)