P3-4: .gitea/workflows/ci-cd.yml 添加 frontend-lint job

This commit is contained in:
2026-06-26 18:38:45 +08:00
parent 9cc79d164a
commit 5ba680a7af
+37
View File
@@ -94,3 +94,40 @@ jobs:
echo "✅ Build completed successfully!"
echo "Branch: ${GITHUB_REF_NAME}"
echo "Commit: ${GITHUB_SHA}"
# P3-4 Fix: 添加前端 Lint 检查 job
frontend-lint:
name: Frontend Lint
runs-on: ubuntu-latest
container: node:20
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: apps/web/package-lock.json
- name: Install dependencies
working-directory: apps/web
run: npm ci
- name: Run ESLint
working-directory: apps/web
run: npx eslint src --ext .ts,.tsx --max-warnings 0
- name: Run TypeScript type check
working-directory: apps/web
run: npx tsc --noEmit
- name: Run Prettier check
working-directory: apps/web
run: npx prettier --check "src/**/*.{ts,tsx,css,md}"
- name: Run Vitest tests
working-directory: apps/web
run: npx vitest run --coverage