mirror of
https://github.com/LHY0125/PathEditor.git
synced 2026-06-28 17:25:54 +08:00
44fdc2eec6
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
61 lines
1.2 KiB
YAML
61 lines
1.2 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- '**'
|
|
tags-ignore:
|
|
- '**'
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
frontend:
|
|
name: 前端检查 (TypeScript + Lint + Test)
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '20'
|
|
cache: 'npm'
|
|
|
|
- run: npm ci
|
|
|
|
- name: TypeScript 类型检查
|
|
run: npx tsc --noEmit
|
|
|
|
- name: ESLint
|
|
run: npm run lint
|
|
|
|
- name: Vitest 测试
|
|
run: npm test
|
|
|
|
rust:
|
|
name: Rust 检查 (Check + Clippy + Test)
|
|
runs-on: windows-latest
|
|
defaults:
|
|
run:
|
|
working-directory: src-tauri
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: 安装 GNU 工具链
|
|
run: |
|
|
rustup toolchain install stable-x86_64-pc-windows-gnu
|
|
rustup override set stable-x86_64-pc-windows-gnu
|
|
|
|
- name: 添加 MinGW 到 PATH
|
|
run: echo "C:\msys64\mingw64\bin" | Out-File -FilePath $env:GITHUB_PATH -Append
|
|
|
|
- name: Cargo Check
|
|
run: cargo check
|
|
|
|
- name: Cargo Clippy
|
|
run: cargo clippy -- -D warnings
|
|
|
|
- name: Cargo Test
|
|
run: cargo test
|