Skip to content

Restore Code Coverage#253

Merged
viceroypenguin merged 3 commits intomasterfrom
coverage
Feb 25, 2026
Merged

Restore Code Coverage#253
viceroypenguin merged 3 commits intomasterfrom
coverage

Conversation

@viceroypenguin
Copy link
Member

No description provided.

Copilot AI review requested due to automatic review settings February 25, 2026 23:15
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the test infrastructure and CI pipelines to re-enable reliable code coverage reporting while expanding the test matrix to newer .NET target frameworks.

Changes:

  • Multi-target test projects for net8.0;net9.0;net10.0 and align Roslyn test reference assemblies per TFM.
  • Adjust analyzer/codefix/generator tests to use framework-appropriate ReferenceAssemblies and cancellation tokens.
  • Update CI workflows to collect and upload coverage, and update release publishing to use NuGet OIDC login.

Reviewed changes

Copilot reviewed 21 out of 21 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
tests/Immediate.Validations.Tests/Utility.cs Adds per-TFM ReferenceAssemblies/reference sets and updates metadata reference helper.
tests/Immediate.Validations.Tests/Immediate.Validations.Tests.csproj Multi-targets tests, updates Roslyn overrides, ref-assemblies packages, and analyzer reference path logic.
tests/Immediate.Validations.Tests/GeneratorTests/GeneratorTestHelper.cs Uses cancellation tokens and centralized reference sets for generator compilation.
tests/Immediate.Validations.Tests/CodeFixTests/MakeValidatePropertyMethodStaticCodefixProviderTests.cs Adjusts raw string literal usage in test inputs/outputs.
tests/Immediate.Validations.Tests/CodeFixTests/CorrectValidatePropertyReturnTypeCodefixProviderTests.cs Adjusts raw string literal usage in test inputs/outputs.
tests/Immediate.Validations.Tests/CodeFixTests/AddValidateMethodCodefixProviderTests.cs Adjusts raw string literal usage in test inputs/outputs.
tests/Immediate.Validations.Tests/CodeFixTests/AddAdditionalValidationsCodeRefactoringProviderTests.cs Adjusts raw string literal usage in test inputs/outputs.
tests/Immediate.Validations.Tests/CodeFixTests/CodeRefactoringTestHelper.cs Switches to centralized Utility.ReferenceAssemblies for refactoring tests.
tests/Immediate.Validations.Tests/CodeFixTests/CodeFixTestHelper.cs Switches to centralized Utility.ReferenceAssemblies for codefix tests.
tests/Immediate.Validations.Tests/AnalyzerTests/AnalyzerTestHelpers.cs Switches to centralized Utility.ReferenceAssemblies for analyzer/suppressor tests.
tests/Immediate.Validations.FunctionalTests/Immediate.Validations.FunctionalTests.csproj Removes coverlet references in favor of the new coverage approach.
src/Immediate.Validations.Shared/ExpressionEvaluator.cs Removes null-forgiveness on reflection invoke to better align with nullable flow.
src/Immediate.Validations.Generators/ValidateTargetTransformer.cs Minor nullability/pattern-matching formatting updates.
src/Immediate.Validations.Generators/Utility.cs Changes template resource stream handling (but currently introduces nullability issues).
src/Immediate.Validations.Analyzers/ValidateClassAnalyzer.cs Minor pattern-matching formatting updates.
src/Immediate.Validations.Analyzers/InvalidAttributeTargetSuppressor.cs Minor cleanup of string usage and pattern-matching formatting.
src/Immediate.Validations.Analyzers/AssemblyBehaviorAnalyzer.cs Minor collection creation / pattern-matching formatting updates.
src/Common/ITypeSymbolExtensions.cs Minor pattern-matching formatting updates.
Directory.Packages.props Updates package versions and introduces per-TFM reference assembly packages; removes coverlet versions; adds code coverage extension version.
.github/workflows/build.yml Updates test step to emit cobertura coverage for Codecov upload.
.github/workflows/release.yml Updates permissions and switches NuGet push to OIDC-based login.
Comments suppressed due to low confidence (1)

tests/Immediate.Validations.FunctionalTests/Immediate.Validations.FunctionalTests.csproj:25

  • This test project no longer references coverlet, but CI now passes --coverage arguments to the test runner. Add the Microsoft.Testing.Extensions.CodeCoverage package (or another supported coverage collector) so the test runner recognizes the coverage options and produces the expected report.
  <ItemGroup>
	<PackageReference Include="Immediate.Handlers" />
	<PackageReference Include="Microsoft.Extensions.DependencyInjection" />
	<PackageReference Include="Microsoft.Extensions.Localization" />
	<PackageReference Include="xunit.v3.mtp-v2" />
  </ItemGroup>

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov
Copy link

codecov bot commented Feb 25, 2026

Codecov Report

❌ Patch coverage is 94.73684% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...mmediate.Validations.Shared/ExpressionEvaluator.cs 0.00% 1 Missing ⚠️
Files with missing lines Coverage Δ
src/Common/ITypeSymbolExtensions.cs 91.58% <100.00%> (+91.58%) ⬆️
....Validations.Analyzers/AssemblyBehaviorAnalyzer.cs 86.11% <100.00%> (+86.11%) ⬆️
...ions.Analyzers/InvalidAttributeTargetSuppressor.cs 96.66% <100.00%> (+96.66%) ⬆️
...ate.Validations.Analyzers/ValidateClassAnalyzer.cs 93.97% <100.00%> (+93.97%) ⬆️
src/Immediate.Validations.Generators/Utility.cs 100.00% <100.00%> (+100.00%) ⬆️
...alidations.Generators/ValidateTargetTransformer.cs 95.21% <100.00%> (+95.21%) ⬆️
...mmediate.Validations.Shared/ExpressionEvaluator.cs 37.90% <0.00%> (+37.90%) ⬆️

... and 34 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI review requested due to automatic review settings February 25, 2026 23:27
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 22 out of 22 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@viceroypenguin viceroypenguin merged commit da00f1d into master Feb 25, 2026
6 checks passed
@viceroypenguin viceroypenguin deleted the coverage branch February 25, 2026 23:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants