mirror of
https://github.com/tlsnotary/notary-server.git
synced 2026-01-09 14:37:54 -05:00
Fix span logging, github actions.
This commit is contained in:
29
.github/workflows/rust.yml
vendored
29
.github/workflows/rust.yml
vendored
@@ -19,11 +19,11 @@ jobs:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Stable
|
||||
uses: actions-rs/toolchain@v1
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
profile: minimal
|
||||
toolchain: stable
|
||||
- uses: Swatinem/rust-cache@v2.0.0
|
||||
|
||||
- uses: Swatinem/rust-cache@v2.5.0
|
||||
|
||||
- name: "Build"
|
||||
run: cargo build
|
||||
@@ -31,11 +31,6 @@ jobs:
|
||||
- name: "Test"
|
||||
run: RUST_LOG=DEBUG cargo test --bins --tests --examples --workspace -- --nocapture
|
||||
|
||||
- name: "Check documentation"
|
||||
# env:
|
||||
# RUSTDOCFLAGS: -D warnings
|
||||
run: cargo doc --no-deps --workspace --document-private-items
|
||||
|
||||
rustfmt:
|
||||
name: Rustfmt
|
||||
runs-on: ubuntu-latest
|
||||
@@ -43,11 +38,25 @@ jobs:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Nightly with rustfmt
|
||||
uses: actions-rs/toolchain@v1
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
profile: minimal
|
||||
toolchain: nightly
|
||||
components: rustfmt
|
||||
|
||||
- name: "Check formatting"
|
||||
run: cargo +nightly fmt --check --all
|
||||
|
||||
clippy:
|
||||
name: Clippy
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Stable
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
toolchain: stable
|
||||
components: clippy
|
||||
|
||||
- name: "Clippy check"
|
||||
run: cargo clippy --all-features -- -D warnings
|
||||
|
||||
@@ -106,13 +106,12 @@ pub async fn run_tcp_server(config: &NotaryServerProperties) -> Result<(), Notar
|
||||
}
|
||||
|
||||
/// Run the notarization
|
||||
#[tracing::instrument(skip(socket, signing_key))]
|
||||
async fn notary_service<T: AsyncWrite + AsyncRead + Send + Sync + Unpin + 'static>(
|
||||
socket: T,
|
||||
prover_address: &str,
|
||||
signing_key: &SigningKey,
|
||||
) -> Result<(), NotaryServerError> {
|
||||
debug!("Starting notarization...");
|
||||
debug!(?prover_address, "Starting notarization...");
|
||||
|
||||
// Temporarily use the prover address as the notarization session id as it is unique for each prover
|
||||
let config = NotaryConfig::builder().id(prover_address).build()?;
|
||||
@@ -123,7 +122,7 @@ async fn notary_service<T: AsyncWrite + AsyncRead + Send + Sync + Unpin + 'stati
|
||||
|
||||
notary.notarize::<Signature>(signing_key).await?;
|
||||
|
||||
debug!("Notarization completed successfully!");
|
||||
debug!(?prover_address, "Notarization completed successfully!");
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user