问题描述
项目没有配置 GitHub CI/CD,导致:
- 每次合并前无法自动检查代码质量
- 无法自动运行 TypeScript 类型检查
- 无法自动运行 lint
- 构建问题只能在本地发现
建议方案
添加 .github/workflows/ci.yml:
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- run: npm ci
- run: npm run lint
- run: npx tsc --noEmit
- run: npm run build
相关 Issue(建议关闭)
本 Issue 由 Memo Code 生成。
@hjx2289206 @AlkaidSTART