Skip to content

Commit

Permalink
Use Test Reporter in GitHub actions
Browse files Browse the repository at this point in the history
  • Loading branch information
0xced committed Dec 21, 2024
1 parent 50e403b commit d875776
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ jobs:
uses: actions/upload-artifact@v4
if: always()
with:
name: TestResults (${{ runner.os }})
path: TestResults-*.html
name: TestResults-${{ runner.os }}.trx
path: "*.trx"
- name: ☂️ Upload coverage report to Codecov
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
Expand Down
24 changes: 24 additions & 0 deletions .github/workflows/test-report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: 'Test Report'

on:
workflow_run:
workflows: ['Continuous Integration']
types:
- completed

permissions:
checks: write

jobs:
report:
strategy:
matrix:
os: [ macos-latest, ubuntu-latest, windows-latest ]
fail-fast: false
steps:
- uses: dorny/test-reporter@v1
with:
artifact: TestResults-${{ runner.os }}.trx
name: Test Results (${{ runner.os }})
path: '*.trx'
reporter: dotnet-trx
10 changes: 9 additions & 1 deletion serilog-formatting-log4net.sln
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ ProjectSection(SolutionItems) = preProject
global.json = global.json
NuGet.config = NuGet.config
.config\dotnet-tools.json = .config\dotnet-tools.json
.github\workflows\continuous-integration.yml = .github\workflows\continuous-integration.yml
src\packages.lock.json = src\packages.lock.json
.github\dependabot.yml = .github\dependabot.yml
MAINTENANCE.md = MAINTENANCE.md
Expand All @@ -18,6 +17,12 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Serilog.Formatting.Log4Net"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Serilog.Formatting.Log4Net.Tests", "tests\Serilog.Formatting.Log4Net.Tests.csproj", "{E94ABEEA-1E45-42DE-9752-896974FC4389}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{7AA372D2-2CE3-417F-ADA5-FD96743FCAB1}"
ProjectSection(SolutionItems) = preProject
.github\workflows\continuous-integration.yml = .github\workflows\continuous-integration.yml
.github\workflows\test-report.yml = .github\workflows\test-report.yml
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -33,4 +38,7 @@ Global
{E94ABEEA-1E45-42DE-9752-896974FC4389}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E94ABEEA-1E45-42DE-9752-896974FC4389}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{7AA372D2-2CE3-417F-ADA5-FD96743FCAB1} = {F0707B5E-7B54-4D36-993B-17293615DEF7}
EndGlobalSection
EndGlobal

0 comments on commit d875776

Please sign in to comment.