学生信息导入 #32

Merged
wangziqi merged 6 commits from xiongyuxing/gongxue-base:main into main 2026-07-22 01:05:48 +00:00
Showing only changes of commit 04082820b0 - Show all commits

View File

@@ -7,34 +7,53 @@ on:
push:
branches: [main]
# 同一分支有新提交时取消旧任务,避免旧任务持续占用 Gitea runner。
concurrency:
group: ci-${{ gitea.ref }}
cancel-in-progress: true
jobs:
lint:
verify:
runs-on: ubuntu-latest
timeout-minutes: 30
env:
CI: 'true'
TURBO_UI: stream
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '22'
- run: npm ci
- run: npm run lint
- name: 检出代码
uses: actions/checkout@v4
timeout-minutes: 3
typecheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- name: 安装 Node.js
uses: actions/setup-node@v4
timeout-minutes: 3
with:
node-version: '22'
- run: npm ci
- run: npm run typecheck
cache: npm
test:
runs-on: ubuntu-latest
needs: [lint, typecheck]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '22'
- run: npm ci
- run: npm run test
- name: 安装依赖
run: npm ci --no-audit --no-fund
timeout-minutes: 10
- name: 代码检查
# 后端原 lint 脚本带 --fixCI 中追加 --no-fix避免检查时修改工作区。
run: |
npm run lint -w @gongxue/admin
npm run lint -w @gongxue/server -- --no-fix
timeout-minutes: 5
- name: 类型检查
run: npm run typecheck
timeout-minutes: 8
- name: 后端测试
run: npm run test -w @gongxue/server -- --runInBand --forceExit
timeout-minutes: 10
- name: 安装 Chromium
run: npx playwright install --with-deps chromium
timeout-minutes: 10
- name: 前端测试
run: npm run test -w @gongxue/admin
timeout-minutes: 10