From 73286d5d5778cf6a6f3f712b8d190e111fdcf101 Mon Sep 17 00:00:00 2001 From: Norman Maurer Date: Sun, 7 Feb 2021 17:56:35 +0100 Subject: [PATCH] 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 --- .github/workflows/ci-pr-reports.yml | 32 +++++++++++++++++++++++++++++ .github/workflows/ci-pr.yml | 9 +++++++- 2 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/ci-pr-reports.yml diff --git a/.github/workflows/ci-pr-reports.yml b/.github/workflows/ci-pr-reports.yml new file mode 100644 index 0000000000..2e47831c28 --- /dev/null +++ b/.github/workflows/ci-pr-reports.yml @@ -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 \ No newline at end of file diff --git a/.github/workflows/ci-pr.yml b/.github/workflows/ci-pr.yml index cd041393a6..a9c51b4ced 100644 --- a/.github/workflows/ci-pr.yml +++ b/.github/workflows/ci-pr.yml @@ -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: