A test project passes with zero tests, and the CI shards are listed by hand

未关闭
#3,311 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
45/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃
技术栈
csharp, github-actions, postgresql

调研方向

Start with Directory.Build.props:73-76, .github/workflows/ci.yml:90-106, DatabaseServer.cs:90, and SqlServerPool.cs:32-45 to trace the test settings, shard coverage, and existing database template approach. Check how the solution discovers test projects and how PostgreSQL tests create and migrate databases. Done means empty test projects fail, every test project is covered by a shard, and PostgreSQL tests migrate once per run; record the time saved in the pull request. Coordinate with #3267, which changes the same workflow.

由索引模型根据 Issue 内容生成。

描述

area:build area:testing type:bug

Problem

  1. A test project passes when it runs no tests. Directory.Build.props:73-76 sets --ignore-exit-code 8 for every project under tests/, with a comment about stubs that no longer applies. Filtered runs are guarded by --minimum-expected-tests; the unfiltered shards (.github/workflows/ci.yml:90,101-106) are not.
  2. The shard lists are maintained by hand. ci.yml:90-106 names each test project. A new one runs on no pull request and no push to main; only the nightly Windows run picks it up.
  3. PostgreSQL tests create and migrate a database per test. DatabaseServer.cs:90 runs CREATE DATABASE for each test, and each test migrates it. SQL Server already clones a migrated template (SqlServerPool.cs:32-45).

Proposal

  • Remove the ignored exit code.
  • A check that every test project of the solution is in a shard.
  • Migrate one template database per run and create test databases from it.

Done together with #3267, which changes the same workflow.

Acceptance

  • A test project that discovers no tests fails the run
  • A test project missing from the shards fails CI
  • PostgreSQL tests no longer migrate per test; the time saved is noted in the pull request

Found in the code review of 17 Nov 2026.

主要语言
C#
星标
569
派生
107
平均合并
2 小时 49 分钟
30 天内合并 PR
397

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

fluentcms/FluentCMS 的其他 Issue

查看 fluentcms/FluentCMS 的全部 Issue

相似的 Issue

更多 C# Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。