ci: add automated test workflow

This commit is contained in:
chengma
2026-07-02 16:28:04 +08:00
parent e52da68835
commit c404d1dd11
6 changed files with 52 additions and 7 deletions
+2
View File
@@ -50,6 +50,7 @@
| 语法检查 | `python -m compileall app main.py` |
| 启动 GUI | `python main.py` / `python -m app` |
| 单元测试(T-006 后) | `python -m unittest discover -s tests` |
| CI 自动验证 | GitHub Actions `.github/workflows/tests.yml`(Windows + Python 3.11 + `QT_QPA_PLATFORM=offscreen`) |
| 跑单账号演示 | `python prototypes/demo.py`(分步)/ `set AUTO=1 && python prototypes/demo.py`(自动) |
| 提交更新(真改线上) | `set UPDATE=1 && python prototypes/demo.py` |
| 读取某账号 Cookie(调试) | `python prototypes/cookies.py` |
@@ -83,5 +84,6 @@ set AUTO=1 && python prototypes/demo.py
| 语法 | 正式代码包与入口 | `python -m compileall app main.py` |
| 单元 | `appconfig/db/excel/prompts/config/chrome` 的纯逻辑 | T-006 建立 `tests/` 后运行 `python -m unittest discover -s tests`,使用临时目录/临时 SQLite/样例 Excel |
| GUI 轻测 | PySide6 主窗口可创建、Tab 数量、worker signal 基本行为 | 可用 unittest 构造 `QApplication`,不连真实 Shopee |
| CI | push / pull_request 自动跑语法 + 全量 unittest | `.github/workflows/tests.yml` 安装 `requirements.txt`,运行 `python -m compileall app main.py` 与 `python -m unittest discover -s tests`;不连真实 Shopee/AI |
| 集成 | CDP/editor 操作 Shopee 测试商品 | 手动跑 `prototypes/demo.py` 或后续专用集成脚本 |
| 外部 AI | 模型连接、文本/图像生成 | 默认 mock;真实调用只在手动验证时跑,避免成本和限流 |