mirror of
https://github.com/lanyeeee/bilibili-video-downloader.git
synced 2026-05-06 20:02:57 +08:00
ci: 将pr的格式检查与代码检查覆盖插件代码
This commit is contained in:
16
.github/workflows/check-backend.yml
vendored
16
.github/workflows/check-backend.yml
vendored
@@ -19,6 +19,7 @@ jobs:
|
||||
filters: |
|
||||
backend:
|
||||
- 'src-tauri/**'
|
||||
- 'src-plugin/**'
|
||||
- '.github/workflows/check-backend.yml'
|
||||
|
||||
- name: Skip backend checks when unchanged
|
||||
@@ -39,7 +40,10 @@ jobs:
|
||||
if: steps.changes.outputs.backend == 'true'
|
||||
uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
workspaces: src-tauri -> target
|
||||
workspaces: |
|
||||
src-tauri -> target
|
||||
src-plugin -> target
|
||||
src-plugin/examples -> target
|
||||
|
||||
- name: Install dependencies
|
||||
if: steps.changes.outputs.backend == 'true'
|
||||
@@ -51,3 +55,13 @@ jobs:
|
||||
if: steps.changes.outputs.backend == 'true'
|
||||
working-directory: src-tauri
|
||||
run: cargo clippy -- -D warnings
|
||||
|
||||
- name: Run Plugin Clippy
|
||||
if: steps.changes.outputs.backend == 'true'
|
||||
working-directory: src-plugin
|
||||
run: cargo clippy --workspace --all-targets -- -D warnings
|
||||
|
||||
- name: Run Plugin Examples Clippy
|
||||
if: steps.changes.outputs.backend == 'true'
|
||||
working-directory: src-plugin/examples
|
||||
run: cargo clippy --workspace --all-targets -- -D warnings
|
||||
|
||||
15
.github/workflows/check-format.yml
vendored
15
.github/workflows/check-format.yml
vendored
@@ -33,7 +33,14 @@ jobs:
|
||||
with:
|
||||
components: rustfmt
|
||||
|
||||
- name: Check Rust formatting
|
||||
run: |
|
||||
cd src-tauri
|
||||
cargo fmt --all -- --check
|
||||
- name: Check Tauri Rust formatting
|
||||
working-directory: src-tauri
|
||||
run: cargo fmt --all -- --check
|
||||
|
||||
- name: Check Plugin Rust formatting
|
||||
working-directory: src-plugin
|
||||
run: cargo fmt --all -- --check
|
||||
|
||||
- name: Check Plugin Examples Rust formatting
|
||||
working-directory: src-plugin/examples
|
||||
run: cargo fmt --all -- --check
|
||||
|
||||
Reference in New Issue
Block a user