mirror of
https://github.com/kristoferssolo/tls-pq-bench.git
synced 2026-03-22 00:36:21 +00:00
ci: add cargo-husky pre-commit hooks
This commit is contained in:
14
.cargo-husky/hooks/pre-commit
Executable file
14
.cargo-husky/hooks/pre-commit
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
echo "Running cargo fmt..."
|
||||
cargo fmt --all -- --check
|
||||
|
||||
echo "Running cargo clippy..."
|
||||
cargo clippy --all-targets --all-features -- -D warnings
|
||||
|
||||
echo "Checking docs..."
|
||||
RUSTDOCFLAGS="-D warnings" cargo doc --no-deps --all-features
|
||||
|
||||
echo "Pre-commit checks passed!"
|
||||
8
.cargo-husky/hooks/pre-push
Executable file
8
.cargo-husky/hooks/pre-push
Executable file
@@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
echo "Running cargo nextest..."
|
||||
cargo nextest run --all-features
|
||||
|
||||
echo "Pre-push checks passed!"
|
||||
16
.github/workflows/ci.yml
vendored
16
.github/workflows/ci.yml
vendored
@@ -12,7 +12,7 @@ jobs:
|
||||
name: Format
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v5
|
||||
- uses: dtolnay/rust-toolchain@nightly
|
||||
with:
|
||||
components: rustfmt
|
||||
@@ -21,7 +21,7 @@ jobs:
|
||||
name: Clippy
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v5
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
components: clippy
|
||||
@@ -31,9 +31,19 @@ jobs:
|
||||
name: Test
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v5
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
- uses: taiki-e/install-action@nextest
|
||||
- run: cargo nextest run --all-features
|
||||
- run: cargo test --doc
|
||||
docs:
|
||||
name: Docs
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
RUSTDOCFLAGS: -Dwarnings
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
- run: cargo doc --no-deps --all-features
|
||||
|
||||
7
Cargo.lock
generated
7
Cargo.lock
generated
@@ -176,6 +176,12 @@ version = "1.11.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b35204fbdc0b3f4446b89fc1ac2cf84a8a68971995d0bf2e925ec7cd960f9cb3"
|
||||
|
||||
[[package]]
|
||||
name = "cargo-husky"
|
||||
version = "1.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7b02b629252fe8ef6460461409564e2c21d0c8e77e0944f3d189ff06c4e932ad"
|
||||
|
||||
[[package]]
|
||||
name = "cc"
|
||||
version = "1.2.54"
|
||||
@@ -253,6 +259,7 @@ checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75"
|
||||
name = "common"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"cargo-husky",
|
||||
"rcgen",
|
||||
"serde",
|
||||
"serde_json",
|
||||
|
||||
15
Cargo.toml
15
Cargo.toml
@@ -10,19 +10,28 @@ license = "MIT OR Apache-2.0"
|
||||
|
||||
[workspace.dependencies]
|
||||
aws-lc-rs = "1"
|
||||
common = { path = "common" }
|
||||
cargo-husky = { version = "1", default-features = false, features = [
|
||||
"user-hooks",
|
||||
] }
|
||||
claims = "0.8"
|
||||
clap = { version = "4.5", features = ["derive"] }
|
||||
common = { path = "common" }
|
||||
miette = { version = "7", features = ["fancy"] }
|
||||
rcgen = "0.14"
|
||||
rstest = "0.26"
|
||||
rustls = { version = "0.23", default-features = false, features = ["std", "tls12", "aws_lc_rs"] }
|
||||
rustls = { version = "0.23", default-features = false, features = [
|
||||
"std",
|
||||
"tls12",
|
||||
"aws_lc_rs",
|
||||
] }
|
||||
serde = { version = "1", features = ["derive"] }
|
||||
serde_json = "1"
|
||||
strum = { version = "0.27", features = ["derive"] }
|
||||
thiserror = "2"
|
||||
tokio = { version = "1", features = ["full"] }
|
||||
tokio-rustls = { version = "0.26", default-features = false, features = ["tls12"] }
|
||||
tokio-rustls = { version = "0.26", default-features = false, features = [
|
||||
"tls12",
|
||||
] }
|
||||
|
||||
[workspace.lints.clippy]
|
||||
nursery = "warn"
|
||||
|
||||
@@ -46,5 +46,4 @@ All experiments should record:
|
||||
|
||||
## License
|
||||
|
||||
Licensed under either of [Apache License, Version 2.0](LICENSE-APACHE) or
|
||||
[MIT license](LICENSE-MIT) at your option.
|
||||
Licensed under either of [Apache License, Version 2.0](LICENSE-APACHE) or [MIT license](LICENSE-MIT) at your option.
|
||||
|
||||
@@ -11,5 +11,8 @@ serde_json.workspace = true
|
||||
strum.workspace = true
|
||||
tokio.workspace = true
|
||||
|
||||
[dev-dependencies]
|
||||
cargo-husky.workspace = true
|
||||
|
||||
[lints]
|
||||
workspace = true
|
||||
|
||||
Reference in New Issue
Block a user