refactor(*): 代码质量治理 - 收敛接口客户端、模型职责与异步计费巡检
This commit is contained in:
48
.github/workflows/quality.yml
vendored
Normal file
48
.github/workflows/quality.yml
vendored
Normal 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
|
||||
Reference in New Issue
Block a user