Files
openbot-coder 1379060482 ci: 修正 setup-uv 引用,astral-sh/setup-uv 没有 v10 滚动标签
astral-sh/setup-uv 仓库只维护到 v7 的滚动大版本标签,v10 仅有精确版本
标签(v10.0.1 / v10.1.0)。此前写成 @v10 会 404,导致 ci.yml 与
release.yml 的所有作业在「安装 uv」这一步就失败。

改为精确版本 @v10.1.0,并逐条核验所有 uses 引用的 ref 均真实存在。
2026-09-15 12:05:15 +08:00

61 lines
1.3 KiB
YAML

name: CI
# 每次 push / PR 都跑,用于在打发布标签之前提前暴露问题
# (本机 Windows 上无法创建 asyncio 事件循环,所以 Linux 侧的首轮验证只能靠这里)
on:
push:
branches:
- main
- develop
pull_request:
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: Test (Python ${{ matrix.python-version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.11", "3.13"]
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Install uv
uses: astral-sh/setup-uv@v10.1.0
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: uv sync --locked
- name: Run tests
run: uv run pytest -q
build:
name: Build check
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Install uv
uses: astral-sh/setup-uv@v10.1.0
with:
python-version: "3.13"
- name: Build sdist and wheel
run: uv build
- name: Check distribution metadata
run: uvx twine check dist/*