Conversation
- 配置CI工作流支持PR时执行代码质量检查、构建和测试 - 设置发布工作流支持标签推送时自动打包发布到NuGet和GitHub Packages - 修复源代码生成器项目的包依赖配置,统一使用GFramework.SourceGenerators.Common命名 - 配置多版本.NET SDK支持及相应的缓存策略 - 实现并行测试执行和统一的测试报告生成机制 - 添加安全扫描和代码质量检查集成
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📜 Recent review details⏰ Context from checks skipped due to timeout of 900000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
🧰 Additional context used🧠 Learnings (1)📚 Learning: 2026-04-16T11:55:23.932ZApplied to files:
🔇 Additional comments (3)
📝 WalkthroughWalkthrough更新 CI 和发布工作流以显式针对 Changes
Sequence Diagram(s)(无 — 本次变更为 CI/打包工作流与 csproj 打包配置调整,未引入需绘制的多组件新控制流) 代码审查工作量估算🎯 3 (中等复杂度) | ⏱️ ~20 分钟 可能相关的PR
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/ci.yml:
- Around line 151-184: The script currently exits early with exit "$failed" at
the end of the test loop which short-circuits downstream report steps; instead,
do not call exit in this script—capture the exit state in the failed variable
and publish it as the step output (use the failed variable name and the test
loop that builds pids/test_projects) so downstream steps always run and
TRX/./ctrf/*.json are produced; then add a separate workflow step after the
report generation (e.g., "Fail if any test project failed") that uses if:
always() && steps.<this-test-step-id>.outputs.failed == '1' and exits 1 to fail
the job only after reports are published.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: cbb889ee-f83d-4b9e-a16f-ff4c23149642
📒 Files selected for processing (3)
.github/workflows/ci.yml.github/workflows/publish.ymlGFramework.Core.SourceGenerators/GFramework.Core.SourceGenerators.csproj
📜 Review details
⏰ Context from checks skipped due to timeout of 900000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: Analyze (C#)
- GitHub Check: Build and Test
- GitHub Check: Code Quality & Security
- GitHub Check: submit-nuget
🧰 Additional context used
📓 Path-based instructions (1)
**/*.csproj
📄 CodeRabbit inference engine (AGENTS.md)
**/*.csproj: Follow the repository defaults withImplicitUsingsdisabled,Nullableenabled,GenerateDocumentationFileenabled for shipped libraries, andLangVersiongenerallypreviewin the main libraries and abstractions
Minimize new package dependencies. Add them only when necessary and keep scope narrow
Files:
GFramework.Core.SourceGenerators/GFramework.Core.SourceGenerators.csproj
🧠 Learnings (12)
📚 Learning: 2026-04-16T11:55:23.932Z
Learnt from: CR
Repo: GeWuYou/GFramework PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-16T11:55:23.932Z
Learning: Applies to **/*.SourceGenerators.cs : When generator behavior changes intentionally, update snapshots together with the implementation
Applied to files:
GFramework.Core.SourceGenerators/GFramework.Core.SourceGenerators.csproj
📚 Learning: 2026-04-16T11:55:23.932Z
Learnt from: CR
Repo: GeWuYou/GFramework PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-16T11:55:23.932Z
Learning: Applies to **/*.SourceGenerators.cs : Keep source generators deterministic and free of hidden environment or network dependencies
Applied to files:
GFramework.Core.SourceGenerators/GFramework.Core.SourceGenerators.csproj
📚 Learning: 2026-04-16T11:55:23.932Z
Learnt from: CR
Repo: GeWuYou/GFramework PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-16T11:55:23.932Z
Learning: Applies to **/*.SourceGenerators.Tests.cs : Source generator changes MUST be covered by generator tests
Applied to files:
GFramework.Core.SourceGenerators/GFramework.Core.SourceGenerators.csproj
📚 Learning: 2026-04-16T11:55:23.932Z
Learnt from: CR
Repo: GeWuYou/GFramework PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-16T11:55:23.932Z
Learning: Applies to **/*.SourceGenerators.Tests.cs : Preserve snapshot-based verification patterns already used in the repository for source generator tests
Applied to files:
GFramework.Core.SourceGenerators/GFramework.Core.SourceGenerators.csproj
📚 Learning: 2026-04-16T13:25:59.124Z
Learnt from: GeWuYou
Repo: GeWuYou/GFramework PR: 235
File: GFramework.SourceGenerators.Tests/Rule/ContextAwareGeneratorSnapshotTests.cs:1-3
Timestamp: 2026-04-16T13:25:59.124Z
Learning: In the GeWuYou/GFramework repository, the test project `GFramework.SourceGenerators.Tests` provides `global using NUnit.Framework;` via its `GlobalUsings.cs`. Do not flag missing `using NUnit.Framework;` directives in test files within this project, as the global using already covers it. The project-wide GlobalUsings.cs pattern is used broadly to supply common namespaces (including NUnit, System.IO, etc.) without per-file imports.
Applied to files:
GFramework.Core.SourceGenerators/GFramework.Core.SourceGenerators.csproj
📚 Learning: 2026-04-16T11:55:23.932Z
Learnt from: CR
Repo: GeWuYou/GFramework PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-16T11:55:23.932Z
Learning: Applies to **/*.Tests.csproj : Public API changes must be covered by unit or integration tests
Applied to files:
GFramework.Core.SourceGenerators/GFramework.Core.SourceGenerators.csproj.github/workflows/ci.yml
📚 Learning: 2026-04-16T11:55:23.932Z
Learnt from: CR
Repo: GeWuYou/GFramework PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-16T11:55:23.932Z
Learning: Applies to **/*.csproj : Minimize new package dependencies. Add them only when necessary and keep scope narrow
Applied to files:
GFramework.Core.SourceGenerators/GFramework.Core.SourceGenerators.csproj
📚 Learning: 2026-04-16T11:55:23.931Z
Learnt from: CR
Repo: GeWuYou/GFramework PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-16T11:55:23.931Z
Learning: Applies to **/*.csproj : Follow the repository defaults with `ImplicitUsings` disabled, `Nullable` enabled, `GenerateDocumentationFile` enabled for shipped libraries, and `LangVersion` generally `preview` in the main libraries and abstractions
Applied to files:
GFramework.Core.SourceGenerators/GFramework.Core.SourceGenerators.csproj
📚 Learning: 2026-04-06T12:45:47.739Z
Learnt from: GeWuYou
Repo: GeWuYou/GFramework PR: 190
File: GFramework.Game/Config/GameConfigBootstrap.cs:1-3
Timestamp: 2026-04-06T12:45:47.739Z
Learning: In the GFramework repository (GeWuYou/GFramework), even though `ImplicitUsings` is disabled in the `.csproj` files, the project uses a manual `GlobalUsings.cs` file with `global using` directives to provide common System namespaces (e.g., System, System.Threading, System.Threading.Tasks) project-wide. Do not flag missing System-level `using` imports in C# files within this repository, as they are covered by GlobalUsings.cs.
Applied to files:
GFramework.Core.SourceGenerators/GFramework.Core.SourceGenerators.csproj
📚 Learning: 2026-04-16T11:55:23.932Z
Learnt from: CR
Repo: GeWuYou/GFramework PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-16T11:55:23.932Z
Learning: Applies to **/*.cs : Any change to public API, lifecycle semantics, module behavior, or extension points MUST update the related XML docs
Applied to files:
GFramework.Core.SourceGenerators/GFramework.Core.SourceGenerators.csproj
📚 Learning: 2026-04-16T11:55:23.932Z
Learnt from: CR
Repo: GeWuYou/GFramework PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-16T11:55:23.932Z
Learning: Applies to **/*.cs : Preserve deterministic behavior in registries, lifecycle orchestration, and generated outputs
Applied to files:
.github/workflows/ci.yml
📚 Learning: 2026-04-16T11:55:23.932Z
Learnt from: CR
Repo: GeWuYou/GFramework PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-16T11:55:23.932Z
Learning: Applies to **/*.Tests.csproj : Every non-trivial feature, bug fix, or behavior change MUST include tests or an explicit justification for why a test is not practical
Applied to files:
.github/workflows/ci.yml
🔇 Additional comments (4)
GFramework.Core.SourceGenerators/GFramework.Core.SourceGenerators.csproj (1)
55-65: 这里的包内依赖名修正是对的。现在
analyzers和lib/netstandard2.0都统一打包GFramework.SourceGenerators.Common.*,和其它 SourceGenerators 项目的约定保持一致,也避免了继续产出不存在的$(AssemblyName).Common.*文件名。.github/workflows/publish.yml (2)
55-79: 显式绑定到GFramework.sln很好。这里把 restore/pack 都收敛到解决方案级别,能避免依赖默认发现逻辑,和 CI 流水线也保持了一致。
81-116: 这个打包结果白名单校验很有价值。发布前先比对实际产物和预期模块列表,能更早发现漏包、误包或命名漂移,对这次 SourceGenerators 依赖名修复尤其有帮助。
.github/workflows/ci.yml (1)
120-145: 显式用GFramework.sln做 restore/build 是个好改动。这样 CI 不会再依赖默认项目发现,行为更稳定,也更符合这个仓库的多项目结构。
- 为测试步骤添加id标识以便后续引用 - 将测试失败状态通过GITHUB_OUTPUT传递给后续步骤 - 添加失败检查步骤确保测试失败时工作流正确终止 - 优化了错误状态的传递机制
Summary by CodeRabbit
发布说明