Repository navigation
ci: 添加独立逻辑回归测试工作流 - #17
Merged
Merged
Conversation
Run the four net8.0 xUnit suites separately on push, pull request, and workflow_dispatch without building or publishing SLDataAPI.dll. Co-authored-by: DNT_OF <allowcache@gmail.com>
The repository Actions policy rejects actions owned outside DNTOF. Check out with git, install the .NET 8 SDK from dotnet-install.sh, and upload TRX through the job's own results service. Co-authored-by: DNT_OF <allowcache@gmail.com>
Plain run steps do not receive the Actions results token. Use a local JavaScript action, which this repository's owner-only action policy allows. Co-authored-by: DNT_OF <allowcache@gmail.com>
CreateArtifact rejected camelCase JSON. Match the results service's protobuf JSON, including plain strings for wrapper fields. Co-authored-by: DNT_OF <allowcache@gmail.com>
Keep suite results in the job log and step summary. Downloadable TRX artifacts wait until an official artifact action is allowed. Co-authored-by: DNT_OF <allowcache@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
做了什么
增加
.github/workflows/functional-tests.yml,在push、pull_request和workflow_dispatch时分别运行四套独立逻辑测试:Auth、Features、Update、WebDav。README 增加一小节,说明这些测试只做逻辑回归,不代替进服集成或完整插件兼容性验证。
为什么不用草稿里的 Windows runner
附带的
functional-tests.yml只是未在 Actions 上跑过的起点。本仓库测试是 net8.0,直接链接纯逻辑源文件,不引用游戏程序集。在干净的 Ubuntu 24.04 / .NET SDK 8.0.427 上四套全部通过。同时,2026-10-19 至 2026-11-19 期间
ubuntu-latest正在从 24.04 迁到 26.04,同一标签可能落到不同镜像。工作流因此固定ubuntu-24.04(与本地验证环境一致,且目前仍是受支持的托管 runner)。Windows 托管 runner 分钟计费更高,而且会跳过 Linux 上的0600权限断言;符号链接测试在 Ubuntu 上可以实际执行。相对草稿的其他调整:
@v4仍是 Node 20。8.0.x,并跳过额外的 LTS 预装。不启用 NuGet 缓存,因为缓存需要actions: write。permissions: contents: read,checkoutpersist-credentials: false。没有pull_request_target,没有 secrets,没有写权限。fail-fast: false,没有continue-on-error。某一套失败时其余套件仍会跑完,失败本身会使检查失败。if: !cancelled()),保留 14 天。作业超时 15 分钟;同一工作流、同一事件、同一 ref 的新运行会取消进行中的运行。本地结果(不是 GitHub Actions)
干净环境、无游戏程序集,命令与工作流一致(
dotnet restore后dotnet test -c Release --no-restore,TRX logger):actionlint 1.7.12(含 shellcheck 0.9.0)对工作流文件无报错。actionlint 1.7.12 的内置 action 数据集尚不认识这些 Node 24 主版本,输入是对照对应 tag 的
action.yml核对的。GitHub Actions 的真实运行结果以本 PR 的检查为准,此处不把本地
dotnet test当成 Actions 已通过。范围
不编译或上传
SLDataAPI.dll,不改发布 / 签名,不改生产代码,不改测试断言,不下载专有游戏 DLL、LabAPI、Unity、签名密钥或真实 token。