-
Notifications
You must be signed in to change notification settings - Fork 2.1k
A basic test suite for orleans source generator #9459
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
…s for source generator
|
||
<PropertyGroup> | ||
<CentralPackageTransitivePinningEnabled>false</CentralPackageTransitivePinningEnabled> | ||
<xUnitVersion>2.9.3</xUnitVersion> |
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.
due to the dependency on xunit.extensibility.execution see https://www.nuget.org/packages/Verify.Xunit/28.15.0#dependencies-body-tab
could we upgrade the xunit versions in this repo? (maybe separate PR)
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.
Yes, we can upgrade xUnit - either in this PR or a separate PR
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.
I think a separate PR would be better, are we still supporting netcoreapp3.1? There are some conditions there, we'll discuss this in the new PR for xunit upgrades
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.
We support it just for the code generator... we will drop it at some point (maybe for the .NET 10 release). It's ok if tests don't cover it.
…leansSourceGeneratorTests
...Orleans.CodeGenerator.Tests/snapshots/OrleansSourceGeneratorTests.TestBasicClass.verified.cs
Show resolved
Hide resolved
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.
Pull Request Overview
This PR introduces a basic test suite for the Orleans source generator to verify generated code using VerifyTests and enhances CI to run the code generator tests across multiple OS environments.
- Added a snapshot file to capture the generated Orleans serialization code.
- Introduced a new test in OrleansSourceGeneratorTests.cs to validate the source generator output.
- Updated the CI configuration to include a dedicated job for testing the code generator.
Reviewed Changes
Copilot reviewed 4 out of 9 changed files in this pull request and generated no comments.
File | Description |
---|---|
test/Orleans.CodeGenerator.Tests/snapshots/OrleansSourceGeneratorTests.TestBasicClass.verified.cs | Added generated snapshot verification file for Orleans serialization. |
test/Orleans.CodeGenerator.Tests/OrleansSourceGeneratorTests.cs | Introduced a basic test case for validating the Orleans source generator. |
.github/workflows/ci.yml | Added a new CI job to test the code generator across multiple operating systems and frameworks. |
Files not reviewed (5)
- .editorconfig: Language not supported
- .gitattributes: Language not supported
- Directory.Packages.props: Language not supported
- Orleans.sln: Language not supported
- test/Orleans.CodeGenerator.Tests/Orleans.CodeGenerator.Tests.csproj: Language not supported
Comments suppressed due to low confidence (1)
.github/workflows/ci.yml:521
- Consider removing 'continue-on-error: true' unless it is intentional, as this setting might mask failures in the code generator tests.
continue-on-error: true
related to #9272
used https://github.com/VerifyTests/Verify to verify the generated code