Skip to content

Commit d06c322

Browse files
committed
Upload coverage report to GitHub
1 parent fd05f94 commit d06c322

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

.github/workflows/continuous-integration.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ jobs:
4444
- name: 🏗 Build solution
4545
run: dotnet build --no-restore
4646
- name: 🧪 Run tests
47+
env:
48+
REPORTGENERATOR_LICENSE: ${{ secrets.REPORTGENERATOR_LICENSE }}
4749
run: dotnet test --no-build
4850
- name: 📤 Upload received files from failing tests
4951
uses: actions/upload-artifact@v4
@@ -57,6 +59,12 @@ jobs:
5759
with:
5860
name: TestResults-${{ runner.os }}.trx
5961
path: "*.trx"
62+
- name: 📤 Upload coverage report
63+
if: matrix.os == 'ubuntu-latest'
64+
uses: actions/upload-artifact@v4
65+
with:
66+
name: Coverage Report
67+
path: coverage
6068
- name: ☂️ Upload coverage report to Codecov
6169
env:
6270
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

tests/Serilog.Formatting.Log4Net.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
<ItemGroup>
4040
<CoverageReport Include="$(VSTestResultsDirectory)/*/coverage.cobertura.xml" />
4141
</ItemGroup>
42-
<ReportGenerator ReportFiles="@(CoverageReport)" TargetDirectory="$(CoverageReportDirectory)" ReportTypes="Html;TextSummary" />
42+
<ReportGenerator ReportFiles="@(CoverageReport)" TargetDirectory="$(CoverageReportDirectory)" ReportTypes="HtmlInline;TextSummary" License="$(REPORTGENERATOR_LICENSE)" />
4343
</Target>
4444

4545
<!-- Because of https://github.com/microsoft/vstest/issues/2378 -->

0 commit comments

Comments
 (0)