mirror of
https://github.com/snowy-yang/qqbotsdk.git
synced 2026-10-21 09:05:21 +00:00
PEP 695 type 语句、typing.override 等既有写法本就 3.12 可用,代码零 改动;pyproject/ruff/pyright 目标版本同步 py312,README 与 GUIDE 的 版本要求更新,uv.lock 随 requires-python 重新解析。
40 lines
873 B
YAML
40 lines
873 B
YAML
name: 代码检测
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
lint:
|
|
name: ruff + pyright + pytest
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
python-version: ["3.12", "3.13"]
|
|
steps:
|
|
- name: 检出代码
|
|
uses: actions/checkout@v4
|
|
|
|
- name: 安装 uv 与 Python ${{ matrix.python-version }}
|
|
uses: astral-sh/setup-uv@v5
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
enable-cache: true
|
|
|
|
- name: 同步依赖(含 dev 组)
|
|
run: uv sync
|
|
|
|
- name: ruff 静态检查
|
|
run: uv run ruff check src tests examples
|
|
|
|
- name: ruff 格式检查
|
|
run: uv run ruff format --check src tests examples
|
|
|
|
- name: pyright 类型检查
|
|
run: uv run pyright
|
|
|
|
- name: pytest 单元测试
|
|
run: uv run pytest
|