重构测试套件并优化 CI 配置#41
Merged
Merged
Conversation
- 添加 pyproject.toml,声明项目元数据和 dev 依赖 (pytest) - 配置 ruff、ty 和 pytest 工具选项 - 删除旧的 requirements.txt"
- 使用 mkdir -p 避免目录已存在时报错 - 改用 ctest 运行 C 测试 - 升级 actions/checkout 版本以保持工具链更新
- 移除旧的 Pylint 矩阵作业 - 新增 Lint 作业,使用 ruff-action 进行 lint 和格式检查 - 新增 TypeCheck 作业,使用 uv + ty 进行类型检查 - 新增 Test 作业,在 Python 3.11~3.14 矩阵下执行 pytest - 所有 Python 相关步骤统一使用 actions/checkout@v6.0.2 和 astral-sh 工具链
- 去掉 .gitignore 中错误的点 - 统一使用 */__pycache__/ 忽略所有 __pycache__ 目录
新增 conftest.py 集中管理 fixture 与资源清理,替换手动脚本为 可自动收集的测试函数,使用 monkeypatch 隔离外部依赖。
Contributor
|
挺好,感谢贡献。但是其实我建议后面的PR可以在你自己的fork仓库里面新拉分支,最好不要从你的main分支中提交PR。比如说你现在是在你的fork仓库中的main分支请求合并到我们仓库的main分支中,但是最好是再从你自己的仓库中再拉一个分支,把更改从你新拉的分支中提交进我们的主分支。否则后续会很乱,特别是在多人维护的项目中。就是在合并之后记得在你自己的repo中删掉新建的分支。 |
Contributor
|
我先看一下你修改的内容,等我周末登主号再合并。 |
Contributor
|
你把我提交给你的PR合并一下,我改了一点东西 |
Contributor
|
还有一点就是项目的支持python版本应该是从python3.10 ~ python3.14。本来也是想支持python3.9的,但是3.9在2025.10.31停止支持,所以现在应该是从3.10到3.14 |
Mix: fix the command extension and the test
Contributor
Author
|
建议后面的PR可以在你自己的fork仓库里面新拉分支,这个我当时忘记了,以后会记得,下面是可能会用到的命令 |
Contributor
|
话说这些命令应该可以直接写在ci的测试文件里面的吧。 |
Contributor
Author
|
ci有配置吧,这是本地用的 |
Contributor
|
行,我知道了 |
Contributor
|
感谢 @sparklelcm333 的贡献! |
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.
测试
CI
其他