chore: 发布版本0.2.13并完善任务执行环境配置

本次提交更新了版本号至0.2.13,同时完成多项改进:
1.  在.gitignore中新增忽略性能分析文件*_profile.html
2.  修复测试用例中echo命令在Windows下无法被正确检测的问题,改用python命令
3.  优化测试用例确保性能统计数据有效,添加耗时模拟函数
4.  为所有CLI任务统一配置项目根目录作为工作目录,解决跨平台执行路径问题
5.  新增测试验证所有任务的cwd配置正确性
This commit is contained in:
2026-06-28 21:38:18 +08:00
parent 467634f8c7
commit 43e1aad1fe
6 changed files with 55 additions and 21 deletions
+2 -2
View File
@@ -193,8 +193,8 @@ def test_should_execute_skip_if_missing_cmd_not_found() -> None:
def test_should_execute_skip_if_missing_cmd_found() -> None:
"""skip_if_missing 但命令存在时应执行."""
# 使用 Python 作为已安装的命令
spec = TaskSpec("a", cmd=["echo"], skip_if_missing=True) # echo 应存在
# 使用 Python 作为已安装的命令Windows 上 echo 是 shell 内置,shutil.which 找不到)
spec = TaskSpec("a", cmd=["python"], skip_if_missing=True) # python 应存在
should_run, reason = spec.should_execute({})
assert should_run is True
assert reason is None