-
Notifications
You must be signed in to change notification settings - Fork 0
build: Update CI pipeline & add tests for net10.0
#34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughGitHub Actions workflows upgraded to newer action versions (v5, specific commit hashes). Added .NET 10 SDK support and updated existing SDKs (v8: 8.0.416, v9: 9.0.307). GitVersion configuration updated from Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes
Possibly related PRs
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
b4d2113 to
f8880e7
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #34 +/- ##
=======================================
Coverage 91.67% 91.67%
=======================================
Files 34 34
Lines 1525 1525
Branches 249 249
=======================================
Hits 1398 1398
Misses 60 60
Partials 67 67 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (3)
.github/workflows/ci.yml (3)
58-66: NuGet cache: redundant restore key
restore-keysrepeats the primary key line; it’s not harmful but redundant. Consider dropping the duplicate.
88-93: Codecov coverage glob may miss nested pathsDepending on collector layout, coverage files can land under deeper subfolders. Prefer a recursive glob.
Apply this minimal change:
- files: ./unit-test-results/*/coverage.opencover.xml + files: ./unit-test-results/**/coverage.opencover.xmlPlease confirm the XPlat collector writes
coverage.opencover.xmlat that location for multi-target runs on your runner.
33-45: Optional refactor: Remove redundantDOTNET_INSTALL_DIRenv vars
actions/setup-dotnet@v5defaults to/usr/share/dotneton ubuntu-latest runners, so theDOTNET_INSTALL_DIRenvironment variables on lines 37 and 44 are unnecessary. Consider removing them to simplify the workflow configuration.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (11)
.github/workflows/ci.yml(4 hunks)GitVersion.yml(1 hunks)global.json(1 hunks)src/CompositeKey.Analyzers.Common.UnitTests/CompositeKey.Analyzers.Common.UnitTests.csproj(1 hunks)src/CompositeKey.Analyzers.Common.UnitTests/packages.lock.json(1 hunks)src/CompositeKey.Analyzers.UnitTests/CompositeKey.Analyzers.UnitTests.csproj(2 hunks)src/CompositeKey.Analyzers.UnitTests/packages.lock.json(1 hunks)src/CompositeKey.SourceGeneration.FunctionalTests/CompositeKey.SourceGeneration.FunctionalTests.csproj(1 hunks)src/CompositeKey.SourceGeneration.FunctionalTests/packages.lock.json(1 hunks)src/CompositeKey.SourceGeneration.UnitTests/CompositeKey.SourceGeneration.UnitTests.csproj(1 hunks)src/CompositeKey.SourceGeneration.UnitTests/packages.lock.json(1 hunks)
🧰 Additional context used
🧠 Learnings (4)
📚 Learning: 2025-08-28T19:57:32.588Z
Learnt from: DrBarnabus
Repo: DrBarnabus/CompositeKey PR: 30
File: src/CompositeKey.Analyzers.Common.UnitTests/Validation/TemplateValidationTests.cs:11-42
Timestamp: 2025-08-28T19:57:32.588Z
Learning: In CompositeKey projects, test files use global usings configuration (likely through ImplicitUsings or similar mechanisms) for common imports like xUnit and Shouldly, eliminating the need for explicit using directives in individual test files.
Applied to files:
src/CompositeKey.SourceGeneration.UnitTests/CompositeKey.SourceGeneration.UnitTests.csprojsrc/CompositeKey.SourceGeneration.FunctionalTests/CompositeKey.SourceGeneration.FunctionalTests.csprojsrc/CompositeKey.SourceGeneration.FunctionalTests/packages.lock.jsonsrc/CompositeKey.Analyzers.UnitTests/CompositeKey.Analyzers.UnitTests.csprojsrc/CompositeKey.Analyzers.UnitTests/packages.lock.jsonsrc/CompositeKey.SourceGeneration.UnitTests/packages.lock.jsonsrc/CompositeKey.Analyzers.Common.UnitTests/CompositeKey.Analyzers.Common.UnitTests.csprojsrc/CompositeKey.Analyzers.Common.UnitTests/packages.lock.json
📚 Learning: 2025-08-28T19:57:32.588Z
Learnt from: DrBarnabus
Repo: DrBarnabus/CompositeKey PR: 30
File: src/CompositeKey.Analyzers.Common.UnitTests/Validation/TemplateValidationTests.cs:11-42
Timestamp: 2025-08-28T19:57:32.588Z
Learning: In CompositeKey projects, test files use global usings (typically in GlobalUsings.cs files or via ImplicitUsings in project files) for common imports like xUnit and Shouldly, so individual test files don't need explicit using directives for these frameworks.
Applied to files:
src/CompositeKey.SourceGeneration.UnitTests/CompositeKey.SourceGeneration.UnitTests.csprojsrc/CompositeKey.SourceGeneration.FunctionalTests/CompositeKey.SourceGeneration.FunctionalTests.csprojsrc/CompositeKey.SourceGeneration.FunctionalTests/packages.lock.jsonsrc/CompositeKey.Analyzers.UnitTests/CompositeKey.Analyzers.UnitTests.csprojsrc/CompositeKey.Analyzers.UnitTests/packages.lock.jsonsrc/CompositeKey.SourceGeneration.UnitTests/packages.lock.jsonsrc/CompositeKey.Analyzers.Common.UnitTests/CompositeKey.Analyzers.Common.UnitTests.csprojsrc/CompositeKey.Analyzers.Common.UnitTests/packages.lock.json
📚 Learning: 2025-08-28T19:57:32.588Z
Learnt from: DrBarnabus
Repo: DrBarnabus/CompositeKey PR: 30
File: src/CompositeKey.Analyzers.Common.UnitTests/Validation/TemplateValidationTests.cs:11-42
Timestamp: 2025-08-28T19:57:32.588Z
Learning: In CompositeKey projects, test files use global usings (typically in GlobalUsings.cs files) for common imports like xUnit and Shouldly, so individual test files don't need explicit using directives for these frameworks.
Applied to files:
src/CompositeKey.SourceGeneration.UnitTests/CompositeKey.SourceGeneration.UnitTests.csprojsrc/CompositeKey.SourceGeneration.FunctionalTests/CompositeKey.SourceGeneration.FunctionalTests.csprojsrc/CompositeKey.SourceGeneration.FunctionalTests/packages.lock.jsonsrc/CompositeKey.Analyzers.UnitTests/CompositeKey.Analyzers.UnitTests.csprojsrc/CompositeKey.Analyzers.UnitTests/packages.lock.jsonsrc/CompositeKey.SourceGeneration.UnitTests/packages.lock.jsonsrc/CompositeKey.Analyzers.Common.UnitTests/CompositeKey.Analyzers.Common.UnitTests.csprojsrc/CompositeKey.Analyzers.Common.UnitTests/packages.lock.json
📚 Learning: 2025-08-28T19:57:32.588Z
Learnt from: DrBarnabus
Repo: DrBarnabus/CompositeKey PR: 30
File: src/CompositeKey.Analyzers.Common.UnitTests/Validation/TemplateValidationTests.cs:11-42
Timestamp: 2025-08-28T19:57:32.588Z
Learning: CompositeKey test projects use MSBuild's <Using Include="..." /> elements in .csproj files combined with <ImplicitUsings>enable</ImplicitUsings> in Directory.Build.props to automatically include Xunit and Shouldly namespaces, eliminating the need for explicit using statements in test files.
Applied to files:
src/CompositeKey.SourceGeneration.UnitTests/CompositeKey.SourceGeneration.UnitTests.csprojsrc/CompositeKey.SourceGeneration.FunctionalTests/CompositeKey.SourceGeneration.FunctionalTests.csprojsrc/CompositeKey.SourceGeneration.FunctionalTests/packages.lock.jsonsrc/CompositeKey.Analyzers.UnitTests/CompositeKey.Analyzers.UnitTests.csprojsrc/CompositeKey.Analyzers.UnitTests/packages.lock.jsonsrc/CompositeKey.SourceGeneration.UnitTests/packages.lock.jsonsrc/CompositeKey.Analyzers.Common.UnitTests/CompositeKey.Analyzers.Common.UnitTests.csprojsrc/CompositeKey.Analyzers.Common.UnitTests/packages.lock.json
🔇 Additional comments (15)
global.json (1)
3-3: SDK 10.0.100 alignment looks goodMatches the added net10.0 targets and setup-dotnet steps. No further notes.
src/CompositeKey.Analyzers.UnitTests/CompositeKey.Analyzers.UnitTests.csproj (1)
4-4: Add net10.0 target — LGTMMulti-targeting net10.0;net9.0;net8.0 is consistent with CI and global.json.
src/CompositeKey.SourceGeneration.FunctionalTests/packages.lock.json (1)
4-1121: Lock graph extended for net10.0 — looks consistentThe net10.0 block mirrors net8.0/net9.0 and aligns with test TFMs. Ensure
dotnet restore --locked-moderemains green post-merge (CI already uses it).Please confirm there are no unintended version drifts for transitive Roslyn packages across TFMs.
src/CompositeKey.SourceGeneration.UnitTests/packages.lock.json (1)
4-323: net10.0 lock additions and central transitive entriesEntries for Roslyn (4.8.0) and test stack look coherent with other TFMs.
src/CompositeKey.Analyzers.Common.UnitTests/packages.lock.json (1)
4-323: Lockfile: add net10.0 — LGTMMatches package set used elsewhere; no red flags.
.github/workflows/ci.yml (5)
46-51: Install .NET 10.0.100 — alignment goodMatches global.json and new TFMs.
80-83: JUnit result file naming — goodUse of
{framework}avoids collisions across TFMs; nice.
107-112: Upload artefacts — OKPinning to
actions/upload-artifact@v5is fine; artefact name and path look correct.
28-28: No issues — actions/checkout@v5 is current and stableThe latest stable major version of actions/checkout is v5, with v6 currently in beta. The specified version is properly published and supported.
54-57: GitVersion setup action and versionSpec 6.x combination is supportedThe GitTools actions (setup and execute) support installing and running GitVersion 6.x via versionSpec: '6.x'. The combination you've pinned is correct. No action required.
src/CompositeKey.SourceGeneration.FunctionalTests/CompositeKey.SourceGeneration.FunctionalTests.csproj (1)
4-4: Add net10.0 target — LGTMConsistent with the rest of the PR and CI.
GitVersion.yml (1)
4-4: No changes required —labelis the correct property for GitVersion 6.xGitVersion's branch configuration uses the
labelproperty for the pre-release identifier, confirming your code change is correct. The oldertagkey is obsolete in v6.x.src/CompositeKey.Analyzers.Common.UnitTests/CompositeKey.Analyzers.Common.UnitTests.csproj (1)
4-4: Framework targeting order appears correct; verify .NET 10 stability.Line 4 now targets
net10.0;net9.0;net8.0with net10.0 listed first (idiomatic for multi-targeting). No changes to PackageReferences or ProjectReferences, which is appropriate since test infrastructure (xUnit, Shouldly) typically works across frameworks.Before merge, please verify:
- .NET 10.0 is a stable/production-ready release (not preview)
- All tests pass on net10.0 in the CI pipeline
src/CompositeKey.SourceGeneration.UnitTests/CompositeKey.SourceGeneration.UnitTests.csproj (1)
4-4: Framework targeting consistent with related test project.Line 4 targeting matches the pattern in
CompositeKey.Analyzers.Common.UnitTests.csproj(net10.0;net9.0;net8.0). Line 37 ProjectReference correctly constrains the referenced SourceGeneration project to netstandard2.0, which is compatible across all three test frameworks.src/CompositeKey.Analyzers.UnitTests/packages.lock.json (1)
4-799: Dependency lock file correctly updated for net10.0 and net9.0.Lines 4–799 (net10.0) and 1596–2391 (net9.0) are new framework blocks with comprehensive, consistent dependency resolution. All direct package versions are identical across net10.0, net9.0, and net8.0 (e.g. xunit 2.9.3, Shouldly 4.3.0, Microsoft.NET.Test.Sdk 17.14.1), ensuring reproducible builds. Transitive dependency graphs are complete and well-formed JSON.
No issues detected.
Also applies to: 1596-2391
Summary by CodeRabbit