Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
## 变更摘要

<!-- 说明这个 PR 解决的问题、目标结果和主要改动。 -->

-

## 影响范围

<!-- 列出受影响的功能、平台、数据或文档;没有则写“无”。 -->

-

## 验证结果

<!-- 写出实际执行的命令和结果,不要只写“测试通过”。 -->

```text

```

## 风险与回滚

- 主要风险:
- 回滚方式:

## 安全与范围确认

- [ ] PR 只处理一个明确主题,没有夹带无关修改。
- [ ] 未提交 `.env`、API Key、Token、密码、Cookie、浏览器数据、数据库、日志、缓存或构建产物。
- [ ] 自动化验证没有连接真实账号、调用付费 Provider、发送消息、发布内容、部署或修改生产数据。
- [ ] 如有界面变化,已提供脱敏截图;没有则说明“无”。
- [ ] 如有数据、配置或兼容性变化,已说明迁移与回滚方式。
66 changes: 66 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: CI

on:
push:
branches: [main]
pull_request:
branches: [main]

permissions:
contents: read

concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
validation:
name: Rust and Web UI
runs-on: ubuntu-latest
timeout-minutes: 30
env:
GH_OAUTH_CLIENT_ID: ci-placeholder
steps:
- name: Check out repository
uses: actions/checkout@v7

- name: Set up Node.js
uses: actions/setup-node@v7
with:
node-version: "22"
cache: npm
cache-dependency-path: web-ui/package-lock.json

- name: Install Web UI dependencies
working-directory: web-ui
run: npm ci --no-audit

- name: Check Web UI formatting
working-directory: web-ui
run: npm run format:check

- name: Lint Web UI
working-directory: web-ui
run: npm run lint

- name: Test Web UI
working-directory: web-ui
run: npm test

- name: Build Web UI
working-directory: web-ui
run: npm run build

- name: Set up Rust
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy

- name: Check Rust formatting
run: cargo fmt --all --check

- name: Lint Rust
run: cargo clippy --all-targets --all-features -- -D warnings

- name: Test Rust
run: cargo test --all-features
Loading