From ba4d4447e8997d067b30a60738a5eee43233254e Mon Sep 17 00:00:00 2001 From: Stephen Shaw Date: Sat, 18 Apr 2026 23:29:26 -0600 Subject: [PATCH] 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 --- .config/dotnet-tools.json | 7 +++++++ .github/workflows/ci.yml | 6 +++++- Directory.Packages.props | 7 +++---- tests/TagLibSharp2.Tests/TagLibSharp2.Tests.csproj | 1 - 4 files changed, 15 insertions(+), 6 deletions(-) diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index 45a37a9..4edcf1c 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -8,6 +8,13 @@ "reportgenerator" ], "rollForward": false + }, + "dotnet-coverage": { + "version": "18.6.2", + "commands": [ + "dotnet-coverage" + ], + "rollForward": false } } } \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e99f5b2..32cdfa6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -41,11 +41,15 @@ jobs: - name: Restore dependencies run: dotnet restore + - name: Restore .NET tools + run: dotnet tool restore + - name: Build run: dotnet build --no-restore --configuration Release - name: Test - run: dotnet test --no-build --configuration Release --verbosity normal --logger "trx;LogFileName=test-results.trx" --collect:"XPlat Code Coverage" + shell: bash + 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\"" - name: Test Summary if: always() && matrix.os == 'ubuntu-latest' diff --git a/Directory.Packages.props b/Directory.Packages.props index 89cd72e..ffc8590 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -7,11 +7,10 @@ - + - - - + + \ No newline at end of file diff --git a/tests/TagLibSharp2.Tests/TagLibSharp2.Tests.csproj b/tests/TagLibSharp2.Tests/TagLibSharp2.Tests.csproj index 2cc9a03..0a7092f 100644 --- a/tests/TagLibSharp2.Tests/TagLibSharp2.Tests.csproj +++ b/tests/TagLibSharp2.Tests/TagLibSharp2.Tests.csproj @@ -11,7 +11,6 @@ -