Files
yml2213 223d30efd0 ci: 新增 GitHub Actions(go vet/test + tsc/lint/build)
- 后端 job:go vet + go test;前端 job:tsc -b、oxlint、vite build
- push/PR 触发;gui-test-screenshots/ 测试截图加入 .gitignore 本地保留
2026-09-05 14:40:14 +08:00

58 lines
1.1 KiB
YAML

name: CI
on:
push:
branches: [main]
pull_request:
jobs:
backend:
name: Backend (go vet + test)
runs-on: ubuntu-latest
defaults:
run:
working-directory: server
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: server/go.mod
cache-dependency-path: server/go.sum
- name: Go module download
run: go mod download
- name: go vet
run: go vet ./...
- name: go test
run: go test ./... -count=1
frontend:
name: Frontend (typecheck + lint + build)
runs-on: ubuntu-latest
defaults:
run:
working-directory: web
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
cache-dependency-path: web/package-lock.json
- name: Install dependencies
run: npm ci
- name: Typecheck
run: npx tsc -b --force
- name: Lint
run: npm run lint
- name: Build
run: npm run build