Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,25 @@ jobs:
working-directory: ImperatorToCK3.UnitTests
shell: pwsh
run: |
dotnet test --coverlet --coverlet-output-format lcov
dotnet test --coverlet --coverlet-output-format lcov --coverlet-file-prefix irtock3
- name: "Locate coverage report"
id: coverage_report
shell: pwsh
run: |
$coverageFile = Get-ChildItem "ImperatorToCK3.UnitTests/bin/Debug/net10.0/TestResults/irtock3.coverage*.info" |
Sort-Object LastWriteTime -Descending |
Select-Object -First 1 -ExpandProperty FullName

if (-not $coverageFile) {
throw "Coverage report not found."
}

"path=$coverageFile" >> $env:GITHUB_OUTPUT
- name: "Publish coverage report to coveralls.io"
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ImperatorToCK3.UnitTests/bin/Debug/net10.0/TestResults/coverage.info
path-to-lcov: ${{ steps.coverage_report.outputs.path }}
format: lcov
debug: true

Expand Down
2 changes: 1 addition & 1 deletion ImperatorToCK3.UnitTests/ImperatorToCK3.UnitTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="coverlet.MTP" Version="8.0.1" />
<PackageReference Include="coverlet.MTP" Version="10.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
Loading