-
-
Notifications
You must be signed in to change notification settings - Fork 5
110 lines (97 loc) · 4.3 KB
/
ci-pr-publish-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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
name: 'Publish Test Report'
on:
workflow_run:
workflows: ['ci-pr'] # runs after ci-pr workflow
types:
- completed
workflow_dispatch:
inputs:
workflow_run_id:
description: 'ID of the workflow run to download artifacts from.'
required: true
default: ''
permissions:
contents: read
actions: read
checks: write
jobs:
publish-reports:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
max-parallel: 10
matrix:
godot-version: ['4.2', '4.2.1', '4.2.2', '4.3']
godot-status: ['stable']
include:
- godot-version: '4.4'
godot-status: 'dev3'
steps:
- uses: actions/checkout@v4
with:
sparse-checkout: .github
# publish Analyzer Tests results
- name: Download Analyzer tests artifacts
uses: actions/download-artifact@v4.1.7
with:
name: artifact_analyzer
github-token: ${{ secrets.GITHUB_TOKEN }}
repository: MikeSchulze/gdUnit4Net
run-id: ${{ github.event.inputs.workflow_run_id || github.event.workflow_run.id }}
# publish TestAdapter Tests results
- name: Download TestAdapter tests artifacts
uses: actions/download-artifact@v4.1.7
with:
name: artifact_adapter_tests
github-token: ${{ secrets.GITHUB_TOKEN }}
repository: MikeSchulze/gdUnit4Net
run-id: ${{ github.event.inputs.workflow_run_id || github.event.workflow_run.id }}
- name: Publish API Test Results
uses: dorny/test-reporter@v1.9.1
with:
name: artifact_analyzer
# using artifact to download is broken since download-artifact@v4 see https://github.com/dorny/test-reporter/issues/363
# We do the download manually on step `Download artifacts`
#artifact: artifact_gdUnit4_Godot${{ matrix.godot-version }}-${{ matrix.godot-status }}${{ matrix.godot-net }}
path: './home/runner/work/gdUnit4Net/gdUnit4Net/analyzers/test/TestResults/*.trx'
reporter: dotnet-trx
fail-on-error: 'false'
fail-on-empty: 'false'
# publish Run gdUnit4-action results
- name: Download action tests artifacts
uses: actions/download-artifact@v4.1.7
with:
name: artifact_action_example_Godot${{ matrix.godot-version }}-${{ matrix.godot-status }}
github-token: ${{ secrets.GITHUB_TOKEN }}
repository: MikeSchulze/gdUnit4Net
run-id: ${{ github.event.inputs.workflow_run_id || github.event.workflow_run.id }}
- name: Publish action Test Results
uses: dorny/test-reporter@v1.9.1
with:
name: report_action_example_Godot${{ matrix.godot-version }}-${{ matrix.godot-status }}
# using artifact to download is broken since download-artifact@v4 see https://github.com/dorny/test-reporter/issues/363
# We do the download manually on step `Download artifacts`
#artifact: artifact_gdUnit4_Godot${{ matrix.godot-version }}-${{ matrix.godot-status }}${{ matrix.godot-net }}
path: './home/runner/work/gdUnit4Net/gdUnit4Net/example/reports/*.xml'
reporter: dotnet-trx
fail-on-error: 'false'
fail-on-empty: 'false'
# publish API Tests results
- name: Download API tests artifacts
uses: actions/download-artifact@v4.1.7
with:
name: artifact_api_tests_Godot${{ matrix.godot-version }}-${{ matrix.godot-status }}
github-token: ${{ secrets.GITHUB_TOKEN }}
repository: MikeSchulze/gdUnit4Net
run-id: ${{ github.event.inputs.workflow_run_id || github.event.workflow_run.id }}
- name: Publish API Test Results
uses: dorny/test-reporter@v1.9.1
with:
name: report_api_tests_Godot${{ matrix.godot-version }}-${{ matrix.godot-status }}
# using artifact to download is broken since download-artifact@v4 see https://github.com/dorny/test-reporter/issues/363
# We do the download manually on step `Download artifacts`
#artifact: artifact_gdUnit4_Godot${{ matrix.godot-version }}-${{ matrix.godot-status }}${{ matrix.godot-net }}
path: './home/runner/work/gdUnit4Net/gdUnit4Net/test/TestResults/*.trx'
reporter: dotnet-trx
fail-on-error: 'false'
fail-on-empty: 'false'