diff --git a/.github/workflows/validate-task.yml b/.github/workflows/validate-task.yml index 33062ea..af67422 100644 --- a/.github/workflows/validate-task.yml +++ b/.github/workflows/validate-task.yml @@ -24,9 +24,11 @@ jobs: uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 # Builds with TreatWarningsAsErrors, so analyzer and code-style warnings fail here. - # --collect drives coverlet.collector to emit Cobertura XML into ./coverage//. + # global.json opts dotnet test into Microsoft.Testing.Platform (MTP) mode, the .NET 10 SDK's replacement for + # the VSTest runner; --coverlet drives coverlet.MTP (coverlet.collector's VSTest data collector is silently + # ignored under MTP) to emit Cobertura XML into ./coverage/. - name: Run unit tests step - run: dotnet test --collect:"XPlat Code Coverage" --results-directory ./coverage + run: dotnet test --coverlet --coverlet-output-format cobertura --results-directory ./coverage # Report-only: fail_ci_if_error is false so a Codecov hiccup or an absent token never fails the gate. - name: Upload coverage to Codecov step diff --git a/Directory.Packages.props b/Directory.Packages.props index f8074c3..8aa51c4 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -1,10 +1,12 @@ - - - + + + + - + @@ -13,8 +15,7 @@ - - - + + diff --git a/LanguageTagsTests/LanguageTagsTests.csproj b/LanguageTagsTests/LanguageTagsTests.csproj index 544a84d..1c44906 100644 --- a/LanguageTagsTests/LanguageTagsTests.csproj +++ b/LanguageTagsTests/LanguageTagsTests.csproj @@ -11,12 +11,15 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - + + diff --git a/global.json b/global.json new file mode 100644 index 0000000..7ec050f --- /dev/null +++ b/global.json @@ -0,0 +1,5 @@ +{ + "test": { + "runner": "Microsoft.Testing.Platform" + } +}