mirror of
https://github.com/Arcadia-Solutions/arcadia.git
synced 2025-12-20 08:49:36 -06:00
feat: add git pre-push hooks (#432)
- Add cargo-husky for automatic hook installation - Run cargo sqlx prepare --check before push - Run cargo clippy with warnings as errors before push Closes #403
This commit is contained in:
15
.cargo-husky/hooks/pre-push
Executable file
15
.cargo-husky/hooks/pre-push
Executable file
@@ -0,0 +1,15 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
set -e
|
||||||
|
|
||||||
|
echo "=== Pre-push checks ==="
|
||||||
|
|
||||||
|
echo "Checking sqlx prepare in backend/storage..."
|
||||||
|
(cd backend/storage && cargo sqlx prepare --check)
|
||||||
|
|
||||||
|
echo "Checking sqlx prepare in shared..."
|
||||||
|
(cd shared && cargo sqlx prepare --check)
|
||||||
|
|
||||||
|
echo "Running cargo clippy..."
|
||||||
|
cargo clippy --all-targets -- -D warnings
|
||||||
|
|
||||||
|
echo "=== All checks passed! ==="
|
||||||
@@ -24,3 +24,8 @@ utoipa = { version = "5.3.1", features = ["actix_extras"] }
|
|||||||
indexmap = { version = "2.11.0", default-features = false, features = ["std", "serde"] }
|
indexmap = { version = "2.11.0", default-features = false, features = ["std", "serde"] }
|
||||||
regex = "1.11.1"
|
regex = "1.11.1"
|
||||||
arcadia-shared = { path = "../../shared" }
|
arcadia-shared = { path = "../../shared" }
|
||||||
|
|
||||||
|
[dev-dependencies.cargo-husky]
|
||||||
|
version = "1.5"
|
||||||
|
default-features = false
|
||||||
|
features = ["user-hooks"]
|
||||||
|
|||||||
Reference in New Issue
Block a user