Skip to content

Test results

Test results #2425

name: Test results
on:
workflow_run:
workflows:
- Python package
types:
- completed
permissions:
contents: read
jobs:
publish-test-results:
name: Publish test results
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion != 'skipped' }}
permissions:
checks: write
pull-requests: write
actions: read
steps:
- name: Harden runner
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
with:
disable-sudo: true
egress-policy: block
allowed-endpoints: >
api.github.com:443
- name: Download artifacts
uses: dawidd6/action-download-artifact@bf251b5aa9c2f7eeb574a96ee720e24f801b7c11 # v6
with:
run_id: ${{ github.event.workflow_run.id }}
name: test-results-.*|event-file
name_is_regexp: true
path: artifacts
- name: Publish test results
uses: EnricoMi/publish-unit-test-result-action@170bf24d20d201b842d7a52403b73ed297e6645b # v2.18.0
with:
commit: ${{ github.event.workflow_run.head_sha }}
event_file: artifacts/event-file/event.json
event_name: ${{ github.event.workflow_run.event }}
files: artifacts/test-results-*/*.xml
comment_mode: ${{ github.event.workflow_run.event == 'pull_request' && 'always' || 'off' }}
report_individual_runs: true
check_run_annotations_branch: "*"