feat: add GitHub Actions workflow for running tests on push and pull request
This commit is contained in:
@@ -109,7 +109,7 @@ uv run pytest tests/test_addon.py tests/test_manifest.py tests/test_pack.py -v
|
||||
uv run python pack.py
|
||||
```
|
||||
|
||||
`.github/workflows/build.yml` 使用 Python 3.12 与 `uv.lock` 中锁定的开发依赖运行完整测试和打包;新增测试依赖时应在 `pyproject.toml` 的 `dev` 依赖组中声明并更新锁文件,不要在 Workflow 中另行维护 `pip install` 清单。
|
||||
`.github/workflows/test.yml` 在 `main` push、Pull Request 与手动触发时使用 Python 3.11 和锁定依赖运行完整测试。`.github/workflows/build.yml` 只响应 `v*` tag,在再次通过完整测试后运行 `pack.py`,并把生成的 ZIP 上传到该 tag 对应的 Gitea Release。`pack.py` 从 `pyproject.toml` 的默认 `dependencies` 读取 Extension wheel 需求,按 Manifest 平台从 PyPI 下载 wheel,并把各平台对应的 wheel 列入包内 Manifest;`src/snapform/wheels/` 只保留本地资产,不作为 uv source。`.github/workflows/docs.yml` 在 `main` 的文档内容、MkDocs 配置或自身 Workflow 变化时部署,也可手动触发;它只使用 `docs` 依赖组,因此不安装默认依赖。Server Environment 与测试依赖声明在 `dev` 组,文档工具声明在 `docs` 组;新增依赖后应更新锁文件,不要在 Workflow 中另行维护下载清单。
|
||||
|
||||
本地预览用户文档:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user