Skip to content

pull_request_completed #394

pull_request_completed

pull_request_completed #394

name: pull_request_completed
# NOTE: this workflow runs on the *develop* branch of the main repository
# after an incoming pull request is run. Changes to this script *will not*
# affect a PR and must first be tested on the develop branch of a fork.
on:
workflow_run:
workflows: ["pull_request"]
types:
- completed
permissions:
actions: read
checks: write
pull-requests: write
jobs:
report-tests:
runs-on: ubuntu-latest
env:
ARTIFACTS_DIR: artifacts
steps:
- name: Download Artifacts
uses: actions/download-artifact@v4
with:
# Syntax: https://www.gnu.org/software/bash/manual/html_node/Pattern-Matching.html
pattern: "+(event-file|test-results-*)"
merge-multiple: false
github-token: ${{secrets.GITHUB_TOKEN}}
run-id: ${{github.event.workflow_run.id}}
path: ${{env.ARTIFACTS_DIR}}
- name: Publish PR comment
uses: EnricoMi/publish-unit-test-result-action@82082dac68ad6a19d980f8ce817e108b9f496c2a # v2.17.1
if: always()
with:
check_name: "Test summary"
commit: ${{github.event.workflow_run.head_sha}}
event_file: ${{env.ARTIFACTS_DIR}}/event-file/event.json
event_name: ${{github.event.workflow_run.event}}
files: "${{env.ARTIFACTS_DIR}}/**/*.xml"
- name: Publish comments on source code
uses: mikepenz/action-junit-report@db71d41eb79864e25ab0337e395c352e84523afe # v4.3.1
if: always()
with:
commit: ${{github.event.workflow_run.head_sha}}
report_paths: "${{env.ARTIFACTS_DIR}}/**/*.xml"
# vim: set nowrap tw=100: