mirror of
https://github.com/snowy-yang/qqbotsdk.git
synced 2026-10-21 12:24:49 +00:00
fix: CI 摆脱 github 依赖(uv 走 pip+tuna、CPython 走 npmmirror),新增网络探测
第二轮实跑:检测工作流 12s 即败于 setup-uv(它从 github.com 拉 uv 二进制),部署工作流却能存活 1 分钟以上——同用 checkout 而死法不 同,判断 checkout 可用、github 拉取是检测链路的堵点。为此: - ci.yml 弃用 setup-uv:pip(tuna 索引)装 uv;uv sync 的 CPython 下载指向 npmmirror 的 python-build-standalone 镜像,包索引走 tuna; - 新增 probe.yml:把 runner 对 github/pypi/tuna/npm/npmmirror/CF API 的连通性写进 commit status(匿名可读),补齐无法读日志时的观测。
This commit is contained in:
1 parent
32bd7c13b5
commit
2916fc5902
2 files changed
+45
-5
No files matched your search
@@ -14,14 +14,18 @@ jobs:
|
||||
- name: 检出代码
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: 安装 uv 与 Python 3.13
|
||||
uses: astral-sh/setup-uv@v5
|
||||
with:
|
||||
python-version: "3.13"
|
||||
# 不开 enable-cache:Gitea 的 Actions 缓存服务不完善,常导致任务末尾失败
|
||||
# 不用 setup-uv:它要从 github.com 拉 uv 二进制与 CPython——runner
|
||||
# 主机对 github 的连通性不可靠(见 probe.yml 探测)。改走 pip/tuna
|
||||
# 装 uv,CPython 走 npmmirror 的 python-build-standalone 镜像,
|
||||
# 包索引走 tuna。
|
||||
- name: 安装 uv
|
||||
run: pip install -i https://pypi.tuna.tsinghua.edu.cn/simple uv
|
||||
|
||||
- name: 同步依赖(含 dev 组)
|
||||
run: uv sync
|
||||
env:
|
||||
UV_DEFAULT_INDEX: https://pypi.tuna.tsinghua.edu.cn/simple
|
||||
UV_PYTHON_INSTALL_MIRROR: https://registry.npmmirror.com/-/binary/python-build-standalone
|
||||
|
||||
- name: ruff 静态检查
|
||||
run: uv run ruff check src tests examples
|
||||
|
||||
Reference in new issue
Block a user