AlexStocks opened a new issue, #4:
URL: https://github.com/apache/dubbo-net/issues/4
## 问题
仓库当前**没有任何 CI**。导入后 `.github/workflows/` 下只剩一个已被删除的个人发布工作流(见 PR #1),因此:
- 2.7 万行的导入 PR **没有任何状态检查**,review 只能靠 PR 正文自述"236 passed"。
- 后续任何 PR 都不会被自动构建/测试。
- `.licenserc.yaml` 配了 `comment: on-failure`,但没有接 license-eye job,等于没生效。
## 建议新增的 workflow
`.github/workflows/build.yml`,至少覆盖:
```yaml
name: build
on:
push: { branches: [main] }
pull_request: { branches: [main] }
permissions:
contents: read
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-dotnet@v6
with: { dotnet-version: '6.0.x' } # 随 net8.0 迁移一并调整
- run: dotnet restore DubboNet.sln
- run: dotnet build DubboNet.sln --configuration Release --no-restore
-p:GeneratePackageOnBuild=false
- run: dotnet test
Tests/UnitTestForDubboNet/UnitTestForDubboNet.csproj --configuration Release
--no-build --no-restore -p:GeneratePackageOnBuild=false
```
补充建议:
1. **限制 `permissions`** 为 `contents: read`,不要沿用默认的宽权限。
2. Action 用**完整版本号**(如 `actions/[email protected]`)而不是浮动大版本,符合 ASF 对第三方 action
的 pin 要求。
3. 单独加一个 license header 检查 job(skywalking-eyes),与 #<header issue> 配合。
4. 注意部分测试会连 `127.0.0.1:2181`(`MyZookeeperTest` 等),确保它们在无 ZooKeeper 的 runner
上仍能通过(当前实现是以 `Assert.ThrowsAsync` 的形式断言连接失败,应该没问题,但需要 CI 首次跑通来确认)。
## 验收
- 首个 PR 上出现 `build-and-test` 与 license 检查两个 required status check。
- 建议随后在 `.asf.yaml` 的 ruleset 里把这两个 check 设为必需。
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]