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