chore(ci): 添加 Gitea Actions 校验工作流
推送与合并请求依次执行 lint、typecheck、unit test 与生产构建
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main, master]
|
||||
pull_request:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
verify:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 15
|
||||
|
||||
steps:
|
||||
- name: 检出代码
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: 准备 Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 22
|
||||
cache: npm
|
||||
|
||||
- name: 安装依赖
|
||||
run: npm ci
|
||||
|
||||
- name: 代码检查
|
||||
run: npm run lint
|
||||
|
||||
- name: 类型检查
|
||||
run: npm run typecheck
|
||||
|
||||
- name: 单元测试
|
||||
run: npm run test
|
||||
|
||||
- name: 生产构建
|
||||
run: npm run build
|
||||
Reference in New Issue
Block a user