Files
omniai-ds-code-package/.gitea/workflows/ci.yml

40 lines
1.0 KiB
YAML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Gitea Actions CI —— 防回潮检查。
#
# 注意:本文件需 Gitea 服务端【启用 Actions】并【配置 act_runner】后才会执行。
# 未配置 runner 时本文件无副作用(不影响本地开发与 husky 钩子)。
# 启用方式:Gitea 站点管理 → 启用 Actions;在 runner 主机注册 act_runner 并打 label。
#
# 本地已有 husky 钩子兜底:pre-commit 跑 tsc+eslint(增量)pre-push 跑 css:audit。
name: CI
on:
push:
branches: [main, "main-merge-work"]
pull_request:
branches: [main]
jobs:
verify:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "npm"
- name: Install dependencies
run: npm ci
- name: Type check
run: npm run type-check
- name: Tests
run: npm run test:run
- name: Lint (error 阻断,warning 放行)
run: npm run lint