Skip to content

Publish Test Results #32

Publish Test Results

Publish Test Results #32

Workflow file for this run

name: Publish Test Results
on:
workflow_run:
workflows:
- Build and Test
types: [completed]
permissions: {}
jobs:
publish-test-results:
if: github.event.workflow_run.conclusion != 'skipped' && github.event.workflow_run.conclusion != 'cancelled'
runs-on: ubuntu-latest
name: Publish test results
permissions:
checks: write
pull-requests: write
contents: read
issues: read
actions: read
steps:
- name: Download test results
uses: actions/download-artifact@v4
with:
run-id: ${{ github.event.workflow_run.id }}
github-token: ${{ github.token }}
name: test-event-file
merge-multiple: false
- name: Download test results
uses: actions/download-artifact@v4
with:
run-id: ${{ github.event.workflow_run.id }}
github-token: ${{ github.token }}
pattern: test-results *
merge-multiple: false
#- name: Publish Test Results
# uses: EnricoMi/publish-unit-test-result-action@v2
# with:
# commit: ${{ github.event.workflow_run.head_sha }}
# event_file: event.json
# event_name: ${{ github.event.workflow_run.event }}
#
# files: '**/*.trx'
# comment_mode: ${{ (github.event.workflow_run.event == 'pull_request' || github.event_name == 'pull_request') && 'failures' || 'off' }}
# report_individual_runs: true
# compare_to_earlier_commit: false
- name: Publish Test Results
uses: nike4613/actions-test-results@v2
with:
commit: ${{ github.event.workflow_run.head_sha }}
event_file: event.json
event_name: ${{ github.event.workflow_run.event }}
files: |
**/*.trx
**/*.xml
comment_mode: failures
comment_on_commit: true