diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 747c8b5c..eacede53 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -83,6 +83,12 @@ jobs: [ -p cdk-integration-tests, ] + database: + [ + REDB, + SQLITE, + MEMORY + ] steps: - name: checkout uses: actions/checkout@v4 @@ -95,7 +101,7 @@ jobs: - name: Clippy run: nix develop -i -L .#stable --command cargo clippy ${{ matrix.build-args }} -- -D warnings - name: Test - run: nix develop -i -L .#stable --command just itest + run: nix develop -i -L .#stable --command just itest ${{ matrix.database }} msrv-build: name: "MSRV build" diff --git a/crates/cdk-integration-tests/src/main.rs b/crates/cdk-integration-tests/src/main.rs index da13e757..5cf76c4d 100644 --- a/crates/cdk-integration-tests/src/main.rs +++ b/crates/cdk-integration-tests/src/main.rs @@ -57,7 +57,7 @@ async fn main() -> Result<()> { let redb_db = MintRedbDatabase::new(&get_temp_dir().join("mint")).unwrap(); start_cln_mint(addr, port, redb_db).await?; } - _ => panic!("Unknown mint db type"), + _ => panic!("Unknown mint db type: {}", mint_db_kind), }; Ok(()) diff --git a/misc/itests.sh b/misc/itests.sh index 849b51d2..50eb7f7f 100755 --- a/misc/itests.sh +++ b/misc/itests.sh @@ -42,7 +42,7 @@ if [[ ! -d "$cdk_itests" ]]; then fi echo "Temp directory created: $cdk_itests" -export MINT_DATABASE="SQLITE"; +export MINT_DATABASE="$1"; cargo build -p cdk-integration-tests cargo build --bin cdk-integration-tests @@ -86,8 +86,5 @@ cargo test -p cdk-integration-tests --test regtest # Capture the exit status of cargo test test_status=$? -# Source PIDs from file -source "$cdk_itests/pids.txt" - # Exit with the status of the tests exit $test_status diff --git a/misc/test.just b/misc/test.just index 489bcd48..29f81dba 100644 --- a/misc/test.just +++ b/misc/test.just @@ -1,4 +1,4 @@ -itest: +itest db: #!/usr/bin/env bash - ./misc/itests.sh + ./misc/itests.sh "{{db}}"