Skip to content

📝 CI Tests Report #277

📝 CI Tests Report

📝 CI Tests Report #277

# Tests report generator using test results published by CI Build workflow
# https://github.com/marketplace/actions/test-reporter
name: '📝 CI Tests Report'
on:
workflow_run:
workflows: [ '🏗️ CI Build' ]
types:
- completed
jobs:
test-report:
name: ${{ matrix.name }} Test Report
strategy:
fail-fast: false
matrix:
include:
- name: "Win64_DX_Release"
- name: "Win64_VK_Release"
- name: "Win32_DX_Release"
- name: "Win32_VK_Release"
- name: "Ubuntu_VK_Release"
- name: "MacOS_MTL_Release"
runs-on: ubuntu-latest
steps:
- name: Generate Test Results Report
id: test-reporter
uses: dorny/test-reporter@v1
with:
artifact: /MethaneKit_${{ matrix.name }}_TestResults_(.*)/
name: ${{ matrix.name }} Tests
path: '*_result.xml'
reporter: java-junit
fail-on-error: 'true'
- name: Add PR Comment with Test Results
uses: marocchino/sticky-pull-request-comment@v2
if: ${{ github.event.workflow_run.event == 'pull_request' && steps.test-reporter.outputs.conclusion == 'success' && (success() || failure()) }}
with:
number: ${{ github.event.workflow_run.pull_requests[0].number }}
header: ${{ matrix.name }} Test Results
recreate: true
message: |
# ${{ matrix.name }} Test Results
- :white_check_mark: ${{ steps.test-reporter.outputs.passed }} tests **passed**
- :x: ${{ steps.test-reporter.outputs.failed }} tests **failed**
- :warning: ${{ steps.test-reporter.outputs.skipped }} tests **skipped**
- :stopwatch: ${{ steps.test-reporter.outputs.time }} ms. run duration
- name: Add Commit Comment with Test Results
if: ${{ github.event.workflow_run.event == 'push' && steps.test-reporter.outputs.conclusion == 'success' && (success() || failure()) }}
uses: peter-evans/commit-comment@v2
with:
sha: ${{ github.event.workflow_run.head_sha }}
body: |
# ${{ matrix.name }} Test Results
- :white_check_mark: ${{ steps.test-reporter.outputs.passed }} tests **passed**
- :x: ${{ steps.test-reporter.outputs.failed }} tests **failed**
- :warning: ${{ steps.test-reporter.outputs.skipped }} tests **skipped**
- :stopwatch: ${{ steps.test-reporter.outputs.time }} ms. run duration