Skip to content

Commit

Permalink
Add the cargo checks to the check script
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastinez committed Sep 9, 2024
1 parent 6017c19 commit 918cc21
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
File renamed without changes.
6 changes: 6 additions & 0 deletions scripts/check-rs
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 918cc21

Please sign in to comment.