ci: add Rust code format check to CI (#797)

This commit adds the Rust code format check to our CI.
This commit is contained in:
SteveLauC
2025-07-22 15:11:13 +08:00
committed by GitHub
parent b97386a827
commit 5b50e4b51b

View File

@@ -1,4 +1,4 @@
name: Rust Code Compile Check name: Rust Code Check
on: on:
pull_request: pull_request:
@@ -7,7 +7,7 @@ on:
- 'src-tauri/**' - 'src-tauri/**'
jobs: jobs:
compile-check: check:
strategy: strategy:
matrix: matrix:
platform: [ubuntu-latest, windows-latest, macos-latest] platform: [ubuntu-latest, windows-latest, macos-latest]
@@ -37,6 +37,13 @@ jobs:
shell: bash shell: bash
run: cargo add --path ../pizza/lib/engine --features query_string_parser,persistence run: cargo add --path ../pizza/lib/engine --features query_string_parser,persistence
- name: Format check
working-directory: src-tauri
shell: bash
run: |
rustup component add rustfmt
cargo fmt --all --check
- name: Check compilation (Without Pizza engine enabled) - name: Check compilation (Without Pizza engine enabled)
working-directory: ./src-tauri working-directory: ./src-tauri
run: cargo check run: cargo check