ci: add db matrix to ci

This commit is contained in:
thesimplekid
2024-09-21 10:57:19 +02:00
parent 4a0637a6a5
commit 3413c24936
4 changed files with 11 additions and 8 deletions

View File

@@ -83,6 +83,12 @@ jobs:
[ [
-p cdk-integration-tests, -p cdk-integration-tests,
] ]
database:
[
REDB,
SQLITE,
MEMORY
]
steps: steps:
- name: checkout - name: checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
@@ -95,7 +101,7 @@ jobs:
- name: Clippy - name: Clippy
run: nix develop -i -L .#stable --command cargo clippy ${{ matrix.build-args }} -- -D warnings run: nix develop -i -L .#stable --command cargo clippy ${{ matrix.build-args }} -- -D warnings
- name: Test - name: Test
run: nix develop -i -L .#stable --command just itest run: nix develop -i -L .#stable --command just itest ${{ matrix.database }}
msrv-build: msrv-build:
name: "MSRV build" name: "MSRV build"

View File

@@ -57,7 +57,7 @@ async fn main() -> Result<()> {
let redb_db = MintRedbDatabase::new(&get_temp_dir().join("mint")).unwrap(); let redb_db = MintRedbDatabase::new(&get_temp_dir().join("mint")).unwrap();
start_cln_mint(addr, port, redb_db).await?; start_cln_mint(addr, port, redb_db).await?;
} }
_ => panic!("Unknown mint db type"), _ => panic!("Unknown mint db type: {}", mint_db_kind),
}; };
Ok(()) Ok(())

View File

@@ -42,7 +42,7 @@ if [[ ! -d "$cdk_itests" ]]; then
fi fi
echo "Temp directory created: $cdk_itests" echo "Temp directory created: $cdk_itests"
export MINT_DATABASE="SQLITE"; export MINT_DATABASE="$1";
cargo build -p cdk-integration-tests cargo build -p cdk-integration-tests
cargo build --bin 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 # Capture the exit status of cargo test
test_status=$? test_status=$?
# Source PIDs from file
source "$cdk_itests/pids.txt"
# Exit with the status of the tests # Exit with the status of the tests
exit $test_status exit $test_status

View File

@@ -1,4 +1,4 @@
itest: itest db:
#!/usr/bin/env bash #!/usr/bin/env bash
./misc/itests.sh ./misc/itests.sh "{{db}}"