-
-
Notifications
You must be signed in to change notification settings - Fork 54
67 lines (57 loc) · 2.5 KB
/
ci-tests-report.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# 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_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