-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add github workflow to run kotlin tests against docker
- Loading branch information
1 parent
476446f
commit 52c9694
Showing
4 changed files
with
152 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: Continuous Integration Checks - Kotlin | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
check-kotlin: | ||
runs-on: ubuntu-latest | ||
|
||
env: | ||
LDK_NODE_JVM_DIR: bindings/kotlin/ldk-node-jvm | ||
LDK_NODE_ANDROID_DIR: bindings/kotlin/ldk-node-android | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up JDK | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: temurin | ||
java-version: 11 | ||
|
||
- name: Run ktlintCheck on ldk-node-jvm | ||
run: | | ||
cd $LDK_NODE_JVM_DIR | ||
./gradlew ktlintCheck | ||
- name: Run ktlintCheck on ldk-node-android | ||
run: | | ||
cd $LDK_NODE_ANDROID_DIR | ||
./gradlew ktlintCheck | ||
- name: Generate Kotlin JVM | ||
run: ./scripts/uniffi_bindgen_generate_kotlin.sh | ||
|
||
- name: Start bitcoind and electrs | ||
run: docker compose up -d | ||
|
||
- name: Run ldk-node-jvm tests | ||
run: | | ||
cd $LDK_NODE_JVM_DIR | ||
./gradlew test -Penv=ci | ||
- name: Run ldk-node-android tests | ||
run: | | ||
cd $LDK_NODE_ANDROID_DIR | ||
./gradlew test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
version: '3' | ||
|
||
services: | ||
bitcoin: | ||
image: blockstream/bitcoind:24.1 | ||
platform: linux/amd64 | ||
command: | ||
[ | ||
"bitcoind", | ||
"-printtoconsole", | ||
"-regtest=1", | ||
"-rpcallowip=0.0.0.0/0", | ||
"-rpcbind=0.0.0.0", | ||
"-rpcuser=user", | ||
"-rpcpassword=pass", | ||
"-fallbackfee=0.00001" | ||
] | ||
ports: | ||
- "18443:18443" # Regtest RPC port | ||
- "18444:18444" # Regtest P2P port | ||
networks: | ||
- bitcoin-electrs | ||
healthcheck: | ||
test: ["CMD", "bitcoin-cli", "-regtest", "-rpcuser=user", "-rpcpassword=pass", "getblockchaininfo"] | ||
interval: 5s | ||
timeout: 10s | ||
retries: 5 | ||
|
||
electrs: | ||
image: blockstream/esplora:electrs-cd9f90c115751eb9d2bca9a4da89d10d048ae931 | ||
platform: linux/amd64 | ||
depends_on: | ||
bitcoin: | ||
condition: service_healthy | ||
command: | ||
[ | ||
"/app/electrs_bitcoin/bin/electrs", | ||
"-vvvv", | ||
"--timestamp", | ||
"--jsonrpc-import", | ||
"--cookie=user:pass", | ||
"--network=regtest", | ||
"--daemon-rpc-addr=bitcoin:18443", | ||
"--http-addr=0.0.0.0:3002" | ||
] | ||
ports: | ||
- "3002:3002" | ||
networks: | ||
- bitcoin-electrs | ||
|
||
networks: | ||
bitcoin-electrs: | ||
driver: bridge |