Skip to content

Report PR test results #303

Report PR test results

Report PR test results #303

Workflow file for this run

# To make sure we don't give unnecessary permissions to the workflow that runs when PRs
# are built, we split the build and report back of test results into two workflows.
# This is based on documention of https://github.com/marketplace/actions/junit-report-action
# with the slight complication that we need to collect both Windows and Ubuntu results
# and combine them together.
name: Report PR test results
on:
workflow_run:
workflows: [build-pr]
types: [completed]
permissions:
checks: write
jobs:
checks:
runs-on: ubuntu-latest
steps:
- name: Download Test Report
uses: dawidd6/action-download-artifact@v2
with:
name: test-results-ubuntu
path: ubuntu
workflow: ${{ github.event.workflow.id }}
run_id: ${{ github.event.workflow_run.id }}
- name: Download Test Report
uses: dawidd6/action-download-artifact@v2
with:
name: test-results-windows
path: windows
workflow: ${{ github.event.workflow.id }}
run_id: ${{ github.event.workflow_run.id }}
- name: Publish Test Report
uses: mikepenz/action-junit-report@v3
with:
commit: ${{github.event.workflow_run.head_sha}}
report_paths: '**/*.xml'
fail_on_failure: true
require_tests: true
check_name: PR Test Results (Windows and Ubuntu)