Skip to content

Commit d875776

Browse files
committed
Use Test Reporter in GitHub actions
1 parent 50e403b commit d875776

File tree

3 files changed

+35
-3
lines changed

3 files changed

+35
-3
lines changed

.github/workflows/continuous-integration.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ jobs:
5252
uses: actions/upload-artifact@v4
5353
if: always()
5454
with:
55-
name: TestResults (${{ runner.os }})
56-
path: TestResults-*.html
55+
name: TestResults-${{ runner.os }}.trx
56+
path: "*.trx"
5757
- name: ☂️ Upload coverage report to Codecov
5858
env:
5959
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/test-report.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: 'Test Report'
2+
3+
on:
4+
workflow_run:
5+
workflows: ['Continuous Integration']
6+
types:
7+
- completed
8+
9+
permissions:
10+
checks: write
11+
12+
jobs:
13+
report:
14+
strategy:
15+
matrix:
16+
os: [ macos-latest, ubuntu-latest, windows-latest ]
17+
fail-fast: false
18+
steps:
19+
- uses: dorny/test-reporter@v1
20+
with:
21+
artifact: TestResults-${{ runner.os }}.trx
22+
name: Test Results (${{ runner.os }})
23+
path: '*.trx'
24+
reporter: dotnet-trx

serilog-formatting-log4net.sln

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ ProjectSection(SolutionItems) = preProject
55
global.json = global.json
66
NuGet.config = NuGet.config
77
.config\dotnet-tools.json = .config\dotnet-tools.json
8-
.github\workflows\continuous-integration.yml = .github\workflows\continuous-integration.yml
98
src\packages.lock.json = src\packages.lock.json
109
.github\dependabot.yml = .github\dependabot.yml
1110
MAINTENANCE.md = MAINTENANCE.md
@@ -18,6 +17,12 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Serilog.Formatting.Log4Net"
1817
EndProject
1918
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Serilog.Formatting.Log4Net.Tests", "tests\Serilog.Formatting.Log4Net.Tests.csproj", "{E94ABEEA-1E45-42DE-9752-896974FC4389}"
2019
EndProject
20+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{7AA372D2-2CE3-417F-ADA5-FD96743FCAB1}"
21+
ProjectSection(SolutionItems) = preProject
22+
.github\workflows\continuous-integration.yml = .github\workflows\continuous-integration.yml
23+
.github\workflows\test-report.yml = .github\workflows\test-report.yml
24+
EndProjectSection
25+
EndProject
2126
Global
2227
GlobalSection(SolutionConfigurationPlatforms) = preSolution
2328
Debug|Any CPU = Debug|Any CPU
@@ -33,4 +38,7 @@ Global
3338
{E94ABEEA-1E45-42DE-9752-896974FC4389}.Release|Any CPU.ActiveCfg = Release|Any CPU
3439
{E94ABEEA-1E45-42DE-9752-896974FC4389}.Release|Any CPU.Build.0 = Release|Any CPU
3540
EndGlobalSection
41+
GlobalSection(NestedProjects) = preSolution
42+
{7AA372D2-2CE3-417F-ADA5-FD96743FCAB1} = {F0707B5E-7B54-4D36-993B-17293615DEF7}
43+
EndGlobalSection
3644
EndGlobal

0 commit comments

Comments
 (0)