From 86b8b265ba5989d4b69e5015ba67c2db5e6954e7 Mon Sep 17 00:00:00 2001 From: ZHANG Dapeng Date: Wed, 5 Jan 2022 10:31:22 -0800 Subject: [PATCH] .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. --- .github/workflows/testing.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index ea883a77b04..609d0841494 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -53,6 +53,13 @@ jobs: - name: Build run: buildscripts/kokoro/unix.sh + - name: Post Failure Upload Test Reports to Artifacts + if: ${{ failure() }} + uses: actions/upload-artifact@v2 + with: + name: Test Reports (JRE ${{ matrix.jre }}) + path: ./*/build/reports/tests/** + retention-days: 14 - name: Check for modified codegen run: test -z "$(git status --porcelain)" || (git status && echo Error Working directory is not clean. Forget to commit generated files? && false)