Files
svfs/.github/workflows/tests.yml
chakcy ae9fc8dbe4
tests / ubuntu-latest / py3.13 (push) Waiting to run
tests / windows-latest / py3.13 (push) Waiting to run
tests / ubuntu-latest / py3.13 (pull_request) Has been cancelled
tests / windows-latest / py3.13 (pull_request) Has been cancelled
chore: 三包一起分发、桌面应用打包脚本与 CI,README 对齐实现
* pyproject:wheel 打三个包(sqlite_vfs + svfs_studio + svfs_client)——两个桌面
  应用的 console script 都声明在同一个发行版里,只打核心包会让 pip 装完
  `svfs-client` 命令存在而模块缺失(跑起来是 ImportError);extras 拆成
  client(完整 PySide6,WebEngine 必需)/ studio(PySide6-Essentials 够用)/
  gui(两者合集,保留旧写法)。实测重建 wheel 三个包齐全、纯标准库层在无
  PySide6 的环境里可导入;
* packaging/:PyInstaller spec(白名单裁剪 Qt 体积,DevTools/QML/opengl32sw 的
  裁剪依据都记在注释里)与 build.py 编排;Nuitka 路线的已知问题(编译后
  Shiboken 无法导入)写在脚本注释里,推荐走 PyInstaller;
* .github/workflows/tests.yml:windows + ubuntu 双跑。文件头注明了两个尚未在真
  runner 上验证过的点——依赖索引(pyproject 默认指清华镜像,CI 里用
  UV_DEFAULT_INDEX 覆盖回 PyPI)与 Linux 上 Qt 需要的系统库;
* README:按实现重新对齐——登录与认证(凭据存储、会话失效反馈、离线宽限)、
  可靠性与诊断(客户端自更新、网络超时/重试/代理/CA、日志落盘)、plugin.json
  的 net_hosts、数据目录(credentials.dat / logs)、桥 API、安装方式与 extras。

uv.lock 同步(dev 组与 extras)。
2026-09-16 17:15:55 +08:00

53 lines
1.8 KiB
YAML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
name: tests
# 说明:本文件是仓库里第一份 CI 配置,**尚未在 GitHub 上真跑过**(本机没有
# 可用的 runner)。跑之前有两个已知的、需要按仓库实际情况确认的点:
#
# 1. pyproject.toml 把 uv 的默认索引指到了清华镜像;GitHub runner 在境外,
# 这里用 UV_DEFAULT_INDEX 覆盖回 PyPI,免得依赖国内镜像的可用性;
# 2. Ubuntu 上 Qt 需要一批系统库(libGL/libEGL/xkbcommon…),缺了会让
# QApplication 建不起来——下面的 apt 步骤只为让 GUI 测试能跑,不想装
# 就把那一步删掉,GUI 测试会因为 import 失败自动跳过(见 test_client_ui.py
# 顶部的 HAVE_QT 约定)。
#
# 测试用标准库 unittest 编写,所以不需要 pytest;Windows 是客户端的目标平台,
# Ubuntu 用来兜住"纯标准库层 + 服务端示例"的跨平台回归。
on:
push:
branches: [main, master]
pull_request:
env:
UV_DEFAULT_INDEX: https://pypi.org/simple
jobs:
test:
name: ${{ matrix.os }} / py3.13
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest]
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v5
with:
enable-cache: true
- name: 安装 Qt 运行库(Linux)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
libgl1 libegl1 libxkbcommon-x11-0 libdbus-1-3 libnss3 \
libxcb-cursor0 libxcb-icccm4 libxcb-keysyms1 libxcb-shape0 \
libasound2t64
- name: 同步依赖(GUI + FastAPI extras)
run: uv sync --extra gui --extra fastapi
- name: 全量测试
run: uv run python -m unittest discover -s tests -p "test_*.py"