Conversation
There was a problem hiding this comment.
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.0and align Roslyn test reference assemblies per TFM. - Adjust analyzer/codefix/generator tests to use framework-appropriate
ReferenceAssembliesand 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
--coveragearguments to the test runner. Add theMicrosoft.Testing.Extensions.CodeCoveragepackage (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 Report❌ Patch coverage is
... and 34 files with indirect coverage changes 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
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.
No description provided.