Skip to content

Commit

Permalink
Enable Test Reporter in GitHub actions
Browse files Browse the repository at this point in the history
It was removed in 1821ac7 but the underlying issue (dorny/test-reporter#363) has been fixed since then.
  • Loading branch information
0xced committed Dec 21, 2024
1 parent a437307 commit a659fe0
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 5 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ jobs:
os: [ macos-latest, ubuntu-latest, windows-latest ]
fail-fast: false
runs-on: ${{ matrix.os }}
permissions:
checks: write
name: 🛠 Build, test and pack
steps:
- name: 🧑‍💻 Checkout git repository
Expand Down Expand Up @@ -52,8 +50,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
25 changes: 25 additions & 0 deletions .github/workflows/test-report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: 'Test Report'

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

permissions:
checks: write

jobs:
report:
runs-on: ubuntu-latest
strategy:
matrix:
os: [ Linux, macOS, Windows ]
fail-fast: false
steps:
- uses: dorny/test-reporter@v1
with:
artifact: TestResults-${{ matrix.os }}.trx
name: Test Results (${{ matrix.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 a659fe0

Please sign in to comment.