Skip to content

Commit 33e1415

Browse files
committed
deps: Update test packages, switch coverage to dotnet-coverage
- MSTest 4.0.2 -> 4.2.1 - Verify.MSTest 31.9.3 -> 31.16.1 - IndexRange 1.1.0 -> 1.1.1 (transitively patches Microsoft.Bcl.Memory to 9.0.14, resolving CVE-2026-26127) - Remove coverlet.collector: superseded by Microsoft.Testing.Extensions .CodeCoverage (bundled with MSTest 4.2.1) for in-test collection - Switch CI coverage to the dotnet-coverage global tool so the workflow no longer depends on a test-project PackageReference; output remains cobertura so Codecov and the coverage summary continue to work unchanged
1 parent 357e28c commit 33e1415

4 files changed

Lines changed: 15 additions & 6 deletions

File tree

.config/dotnet-tools.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@
88
"reportgenerator"
99
],
1010
"rollForward": false
11+
},
12+
"dotnet-coverage": {
13+
"version": "18.6.2",
14+
"commands": [
15+
"dotnet-coverage"
16+
],
17+
"rollForward": false
1118
}
1219
}
1320
}

.github/workflows/ci.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,15 @@ jobs:
4141
- name: Restore dependencies
4242
run: dotnet restore
4343

44+
- name: Restore .NET tools
45+
run: dotnet tool restore
46+
4447
- name: Build
4548
run: dotnet build --no-restore --configuration Release
4649

4750
- name: Test
48-
run: dotnet test --no-build --configuration Release --verbosity normal --logger "trx;LogFileName=test-results.trx" --collect:"XPlat Code Coverage"
51+
shell: bash
52+
run: dotnet dotnet-coverage collect --output-format cobertura --output TestResults/coverage.cobertura.xml "dotnet test --no-build --configuration Release --verbosity normal --logger \"trx;LogFileName=test-results.trx\""
4953

5054
- name: Test Summary
5155
if: always() && matrix.os == 'ubuntu-latest'

Directory.Packages.props

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,10 @@
77
<PackageVersion Include="PublicApiGenerator" Version="11.5.4" />
88
<PackageVersion Include="System.Memory" Version="4.6.3" />
99
<PackageVersion Include="Microsoft.Bcl.HashCode" Version="6.0.0" />
10-
<PackageVersion Include="IndexRange" Version="1.1.0" />
10+
<PackageVersion Include="IndexRange" Version="1.1.1" />
1111
<PackageVersion Include="Nullable" Version="1.3.1" />
1212
<!-- Testing -->
13-
<PackageVersion Include="MSTest" Version="4.1.0" />
14-
<PackageVersion Include="coverlet.collector" Version="6.0.4" />
15-
<PackageVersion Include="Verify.MSTest" Version="31.12.5" />
13+
<PackageVersion Include="MSTest" Version="4.2.1" />
14+
<PackageVersion Include="Verify.MSTest" Version="31.16.1" />
1615
</ItemGroup>
1716
</Project>

tests/TagLibSharp2.Tests/TagLibSharp2.Tests.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
<ItemGroup>
1313
<PackageReference Include="MSTest" />
14-
<PackageReference Include="coverlet.collector" PrivateAssets="all" />
1514
<PackageReference Include="PublicApiGenerator" />
1615
<PackageReference Include="Verify.MSTest" />
1716
</ItemGroup>

0 commit comments

Comments
 (0)