Publish test results after PR run (#11002)

Motivation:

To make it easier to understand why a build failed let us publish the rest results

Modifications:

Use a new workflow to be able to publish the test reports

Result:

Easier to understand why a PR did fail
This commit is contained in:
Norman Maurer 2021-02-07 17:56:35 +01:00 committed by GitHub
parent d943d11eb0
commit 73286d5d57
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 40 additions and 1 deletions

32
.github/workflows/ci-pr-reports.yml vendored Normal file
View File

@ -0,0 +1,32 @@
name: PR Reports
on:
workflow_run:
workflows: [ "Build PR" ]
types:
- completed
jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- setup: linux-x86_64-java8
- setup: linux-x86_64-java11
- setup: linux-x86_64-java15
- setup: linux-x86_64-java11-boringssl
steps:
- name: Download Artifacts
uses: dawidd6/action-download-artifact@v2.11.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
workflow: ${{ github.event.workflow_run.workflow_id }}
commit: ${{ github.event.workflow_run.head_commit.id }}
# File location set in ci-pr.yml and must be coordinated.
name: test-results-${{ matrix.setup }}
- name: Publish Test Report
uses: scacap/action-surefire-report@v1.0.7
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
report_paths: '**/target/surefire-reports/TEST-*.xml'
commit: ${{ github.event.workflow_run.head_commit.id }}
check_name: test reports

View File

@ -91,7 +91,7 @@ jobs:
docker-compose-build: "-f docker/docker-compose.yaml -f docker/docker-compose.centos-6.111.yaml build"
docker-compose-run: "-f docker/docker-compose.yaml -f docker/docker-compose.centos-6.111.yaml run build-leak-boringssl-static"
name: ${{ matrix.setup }}
name: ${{ matrix.setup }} build
needs: verify-pr
steps:
- uses: actions/checkout@v2
@ -127,6 +127,13 @@ jobs:
- name: Checking for detected leak
run: ./.github/scripts/check_leak.sh build-leak.output
- name: Upload Test Results
if: always()
uses: actions/upload-artifact@v2
with:
name: test-results-${{ matrix.setup }}
path: '**/target/surefire-reports/TEST-*.xml'
- uses: actions/upload-artifact@v2
if: ${{ failure() }}
with: