``` #43
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: 持续集成 | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| workflow_dispatch: | |
| jobs: | |
| check: | |
| name: 检查代码 | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: 安装系统依赖 | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| libwebkit2gtk-4.1-dev \ | |
| libappindicator3-dev \ | |
| librsvg2-dev \ | |
| patchelf \ | |
| pkg-config \ | |
| libglib2.0-dev \ | |
| libgtk-3-dev \ | |
| libgdk-pixbuf2.0-dev \ | |
| libpango1.0-dev \ | |
| libatk1.0-dev \ | |
| libcairo-gobject2 \ | |
| libjavascriptcoregtk-4.1-dev \ | |
| libasound2-dev \ | |
| libpulse-dev \ | |
| libjack-dev | |
| - name: 安装 Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: lts/* | |
| - name: 安装 pnpm | |
| uses: pnpm/action-setup@v4 | |
| - name: 安装 Rust stable 工具链 | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: 配置 Rust 缓存 | |
| uses: swatinem/rust-cache@v2 | |
| - name: 安装前端依赖 | |
| run: pnpm install | |
| - name: 检查代码 (Rust) | |
| run: cargo check --verbose | |
| - name: 代码规范检查 (Clippy) | |
| run: cargo clippy -- -D warnings |