refactor(*): 代码质量治理 - 收敛接口客户端、模型职责与异步计费巡检

This commit is contained in:
ddCat
2026-08-06 16:36:51 +08:00
parent 9ca9dd9df6
commit b3199c5e7e
42 changed files with 3051 additions and 2271 deletions

48
.github/workflows/quality.yml vendored Normal file
View File

@@ -0,0 +1,48 @@
name: Quality checks
on:
pull_request:
push:
branches:
- main
permissions:
contents: read
jobs:
backend:
name: Backend checks
runs-on: ubuntu-latest
defaults:
run:
working-directory: backend
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: backend/go.mod
cache: true
- name: Check formatting
run: test -z "$(gofmt -l .)"
- name: Run Go tests
run: go test ./...
web:
name: Web checks
runs-on: ubuntu-latest
defaults:
run:
working-directory: web
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
with:
bun-version: 1.3.9
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Check formatting
run: bun run format:check
- name: Typecheck
run: bun run typecheck
- name: Run tests
run: bun run test