Skip to content

Commit

Permalink
add hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
liangyongrui committed Sep 8, 2021
1 parent 2a70d7c commit 7bad757
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .cargo-husky/hooks/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/sh

set -e

echo '+cargo +nightly fmt -- --check'
rustup component add rustfmt --toolchain nightly
cargo +nightly fmt -- --check

echo '+cargo test --workspace'
cargo test --workspace

echo '+cargo clippy'
cargo clippy
7 changes: 7 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,8 @@ pd = { path = "component/pd" }

[target.'cfg(not(target_env = "msvc"))'.dependencies]
tikv-jemallocator = "0.4.0"

[dev-dependencies.cargo-husky]
version = "1"
default-features = false
features = ["user-hooks"]

0 comments on commit 7bad757

Please sign in to comment.