Skip to content

Commit

Permalink
Fix the problem of CI error reporting.
Browse files Browse the repository at this point in the history
  • Loading branch information
wa5i committed Sep 20, 2024
1 parent 5737fdd commit 6f915e2
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 8 deletions.
27 changes: 24 additions & 3 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,13 @@ jobs:
run: ulimit -n 65535
- name: Run tests
run: cargo test --verbose
- name: debug with ssh tunnel
if: ${{ failure() }}
uses: wa5i/ssh-to-actions@main
with:
SSH_PASSWORD: ${{ secrets.SSH_PASSWORD }}
NPS_SERVER: ${{ secrets.NPS_SERVER }}
NPS_VKEY: ${{ secrets.NPS_VKEY }}

unix-tongsuo-test:
strategy:
Expand All @@ -53,14 +60,28 @@ jobs:
make install
popd
- uses: actions/checkout@v3
- name: Configure the Cargo.toml to depend on the tongsuo library.
run : |
pwd
echo '[patch.crates-io]' >> ./Cargo.toml
echo 'openssl = { git = "https://github.com/Tongsuo-Project/rust-tongsuo.git" }' >> ./Cargo.toml
echo 'openssl-sys = { git = "https://github.com/Tongsuo-Project/rust-tongsuo.git" }' >> ./Cargo.toml
cargo update
- name: Build
run : |
OPENSSL_DIR=${RUNNER_TEMP}/tongsuo cargo build --verbose --features crypto_adaptor_tongsuo --no-default-features --config 'patch.crates-io.openssl.git="https://github.com/Tongsuo-Project/rust-tongsuo.git"' --config 'patch.crates-io.openssl-sys.git="https://github.com/Tongsuo-Project/rust-tongsuo.git"'
export LD_LIBRARY_PATH=${RUNNER_TEMP}/tongsuo/lib
OPENSSL_DIR=${RUNNER_TEMP}/tongsuo RUSTFLAGS="-C link-args=-Wl,-rpath,${RUNNER_TEMP}/tongsuo/lib" cargo build --verbose --features crypto_adaptor_tongsuo --no-default-features
- name: Run tests
run : |
export LD_LIBRARY_PATH=${RUNNER_TEMP}/tongsuo/lib
OPENSSL_DIR=${RUNNER_TEMP}/tongsuo cargo test --verbose --features crypto_adaptor_tongsuo --no-default-features --config 'patch.crates-io.openssl.git="https://github.com/Tongsuo-Project/rust-tongsuo.git"' --config 'patch.crates-io.openssl-sys.git="https://github.com/Tongsuo-Project/rust-tongsuo.git"'
OPENSSL_DIR=${RUNNER_TEMP}/tongsuo RUSTFLAGS="-C link-args=-Wl,-rpath,${RUNNER_TEMP}/tongsuo/lib" cargo test --verbose --features crypto_adaptor_tongsuo --no-default-features
- name: debug with ssh tunnel
if: ${{ failure() }}
uses: wa5i/ssh-to-actions@main
with:
SSH_PASSWORD: ${{ secrets.SSH_PASSWORD }}
NPS_SERVER: ${{ secrets.NPS_SERVER }}
NPS_VKEY: ${{ secrets.NPS_VKEY }}

unix-mysql-test:
strategy:
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ ipnetwork = "0.20"
blake2b_simd = "1.0"
derive_more = "0.99.17"
dashmap = "5.5"
tokio = { version = "1.40", features = ["rt-multi-thread", "macros"] }
tokio = { version = "1.38", features = ["rt-multi-thread", "macros"] }
ctor = "0.2.8"
better_default = "1.0.5"

Expand Down
4 changes: 1 addition & 3 deletions src/http/logical.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,7 @@ async fn logical_request_handler(
}
}

let core = core.read()?;
let res = core.handle_request(&mut r)?;
match res {
match core.read()?.handle_request(&mut r)? {
Some(resp) => response_logical(&resp, &r.path),
None => {
if matches!(r.operation, Operation::Read | Operation::List) {
Expand Down
1 change: 0 additions & 1 deletion src/test_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,6 @@ mod tests {
let dir = env::temp_dir().join(*TEST_DIR);
let _ = fs::remove_dir_all(&dir);
let _ = rustls::crypto::ring::default_provider().install_default();
println!("create rusty_vault_test dir: {}", dir.to_string_lossy().into_owned());
assert!(fs::create_dir(&dir).is_ok());
}

Expand Down

0 comments on commit 6f915e2

Please sign in to comment.