diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 7036c6cf2f..1d417829bd 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -137,7 +137,7 @@ jobs: - name: clean build dir run: rm -rf libsql-ffi/bundled/SQLite3MultipleCiphers/build - name: embedded replica encryption tests - run: cargo test -F test-encryption --package libsql-server --test tests embedded_replica + run: cargo xtask test-encryption windows: runs-on: windows-latest name: Windows checks diff --git a/xtask/src/main.rs b/xtask/src/main.rs index 4ee208e621..9655624f3c 100644 --- a/xtask/src/main.rs +++ b/xtask/src/main.rs @@ -18,6 +18,7 @@ fn try_main() -> Result<()> { Some("build-wasm") => build_wasm(&arg)?, Some("sim-tests") => sim_tests(&arg)?, Some("test") => run_tests(&arg)?, + Some("test-encryption") => run_tests_encryption(&arg)?, Some("publish") => publish(&arg)?, _ => print_help(), } @@ -32,6 +33,7 @@ build builds all languages build-wasm builds the wasm components in wasm32-unknown-unknown build-bundled builds sqlite3 and updates the bundeled code for ffi test runs the entire libsql test suite using nextest +test-encryption runs encryption tests for embedded replicas sim-tests runs the libsql-server simulation test suite publish-cratesio publish libsql client crates to crates.io " @@ -81,6 +83,26 @@ fn run_tests(arg: &str) -> Result<()> { Ok(()) } +fn run_tests_encryption(arg: &str) -> Result<()> { + println!("installing nextest"); + run_cargo(&["install", "--force", "cargo-nextest"])?; + println!("running nextest run"); + run_cargo(&[ + "nextest", + "run", + "-F", + "test-encryption", + "-p", + "libsql-server", + "--test", + "tests", + "embedded_replica", + arg, + ])?; + + Ok(()) +} + fn sim_tests(arg: &str) -> Result<()> { run_cargo(&["test", "--test", "tests", arg])?;