mirror of
https://github.com/aljazceru/cdk.git
synced 2025-12-21 22:54:49 +01:00
ci: add db matrix to ci
This commit is contained in:
8
.github/workflows/ci.yml
vendored
8
.github/workflows/ci.yml
vendored
@@ -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"
|
||||||
|
|||||||
@@ -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(())
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
itest:
|
itest db:
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
./misc/itests.sh
|
./misc/itests.sh "{{db}}"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user