mirror of
https://github.com/snowy-yang/qqbotsdk.git
synced 2026-10-21 11:04:48 +00:00
channel/group/guild/test_api 的函数签名换行偏离 ruff format(CI 只跑 ruff check 拦不住格式漂移),先归一再补 ruff format --check 步骤防回潮。
37 lines
758 B
YAML
37 lines
758 B
YAML
name: 代码检测
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
lint:
|
|
name: ruff + pyright + pytest
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: 检出代码
|
|
uses: actions/checkout@v4
|
|
|
|
- name: 安装 uv 与 Python 3.13
|
|
uses: astral-sh/setup-uv@v5
|
|
with:
|
|
python-version: "3.13"
|
|
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
|