Skip to content

Publish Test Results #751

Publish Test Results

Publish Test Results #751

name: Publish Test Results
on:
workflow_run:
workflows: ["Receive Pull Request"]
types:
- completed
jobs:
publish-test-results:
name: Publish Test Results
runs-on: ubuntu-latest
# the build-and-test job might be skipped, we don't need to run this job then
if: >
${{ github.event.workflow_run.event == 'pull_request' &&
( github.event.workflow_run.conclusion == 'success' ||
github.event.workflow_run.conclusion == 'failure' ) }}
steps:
- name: 'Download artifact'
uses: actions/download-artifact@v4
with:
name: unit-test-results
github-token: ${{ secrets.GITHUB_TOKEN }}
run-id: ${{ github.event.workflow_run.id }}
- name: Publish Unit Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
with:
check_name: Unit Test Results
github_token: ${{ secrets.GITHUB_TOKEN }}
commit: ${{ github.event.workflow_run.head_sha }}
trx_files: "**/*.trx"
report_individual_runs: true
check_run_annotations: all tests, skipped tests