-
Notifications
You must be signed in to change notification settings - Fork 1
44 lines (35 loc) · 900 Bytes
/
ci.yml
File metadata and controls
44 lines (35 loc) · 900 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
ci:
name: 构建与检查
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: 签出代码
uses: actions/checkout@v4
- name: 配置 Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- name: 安装依赖
run: npm ci
- name: ESLint 检查
run: npm run lint
- name: TypeScript 类型检查
run: npx tsc --noEmit
- name: 构建项目
run: npm run build
env:
# CI 构建使用占位值,仅验证构建流程
CHAT_API_URL: https://placeholder.example.com
CHAT_API_KEY: ci-placeholder
ALIBABA_API_KEY: ci-placeholder