Skip to content

Commit

Permalink
.github/workflows: publish test results for failed job
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
dapengzhang0 authored Jan 5, 2022
1 parent 24e345c commit 86b8b26
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 86b8b26

Please sign in to comment.