Skip to content

Commit 8781141

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

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

.github/workflows/continuous-integration.yml

+7-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
- name: 🏗 Build solution
4545
run: dotnet build --no-restore
4646
- name: 🧪 Run tests
47-
run: dotnet test --no-build
47+
run: dotnet test --no-build -p:ReportGeneratorLicense=${{ secrets.REPORTGENERATOR_LICENSE }}
4848
- name: 📤 Upload received files from failing tests
4949
uses: actions/upload-artifact@v4
5050
if: failure()
@@ -57,6 +57,12 @@ jobs:
5757
with:
5858
name: TestResults-${{ runner.os }}.trx
5959
path: "*.trx"
60+
- name: 📤 Upload coverage report
61+
if: matrix.os == 'ubuntu-latest'
62+
uses: actions/upload-artifact@v4
63+
with:
64+
name: Coverage Report
65+
path: coverage
6066
- name: ☂️ Upload coverage report to Codecov
6167
env:
6268
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

tests/Serilog.Formatting.Log4Net.Tests.csproj

+1-1
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="$(ReportGeneratorLicense)" />
4343
</Target>
4444

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

0 commit comments

Comments
 (0)