Add the cargo checks to the check script

This commit is contained in:
Sebastian Martinez
2024-09-09 10:54:19 +02:00
parent 6017c191a9
commit 918cc213d8
4 changed files with 11 additions and 6 deletions
+2 -5
View File
@@ -12,7 +12,7 @@ jobs:
node-version: "20.9.0"
- uses: actions/checkout@v4
- run: npm ci
- run: npm run check
- run: npm run check-js
lint-rust:
name: lint rust
runs-on: ubuntu-latest
@@ -29,7 +29,4 @@ jobs:
with:
packages: libgtk-3-dev libsoup-3.0-dev libjavascriptcoregtk-4.1-dev libwebkit2gtk-4.1-dev
version: 1.0
- name: Run clippy
run: cargo clippy --all --tests -- -Dwarnings
- name: Check formatting
run: cargo fmt --all --check
- run: npm run check-rs
+3 -1
View File
@@ -8,7 +8,9 @@
"start": "vite",
"build": "vite build",
"preview": "vite preview",
"check": "scripts/check",
"check": "scripts/check-js && scripts/check-rs",
"check-js": "scripts/check-js",
"check-rs": "scripts/check-rs",
"format": "npx prettier '**/*.@(ts|js|svelte|json|css|html|yml)' --write",
"tauri": "npx tauri"
},
View File
+6
View File
@@ -0,0 +1,6 @@
#!/bin/sh
set -e
cargo check --manifest-path ./src-tauri/Cargo.toml
cargo clippy --manifest-path ./src-tauri/Cargo.toml -- -Dwarnings
cargo fmt --manifest-path ./src-tauri/Cargo.toml --check