Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/cln-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
sudo apt-get install -y socat

- name: Start bitcoind, electrs, and lightningd
run: docker compose -f docker-compose-cln.yml up -d
run: docker compose --profile cln up -d

- name: Forward lightningd RPC socket
run: |
Expand Down
50 changes: 50 additions & 0 deletions .github/workflows/eclair-integration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: CI Checks - Eclair Integration Tests

on: [push, pull_request]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
check-eclair:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Start bitcoind and electrs
run: docker compose up -d

- name: Wait for bitcoind to be healthy
run: |
for i in $(seq 1 30); do
if docker exec ldk-node-bitcoin-1 bitcoin-cli -regtest -rpcuser=user -rpcpassword=pass getblockchaininfo > /dev/null 2>&1; then
echo "bitcoind is ready"
break
fi
echo "Waiting for bitcoind... ($i/30)"
sleep 2
done

- name: Create Eclair wallet on bitcoind
run: |
docker exec ldk-node-bitcoin-1 bitcoin-cli -regtest -rpcuser=user -rpcpassword=pass createwallet eclair || true

- name: Start Eclair
run: docker compose --profile eclair up -d

- name: Wait for Eclair to be ready
run: |
for i in $(seq 1 60); do
if curl -s -u :eclairpassword http://127.0.0.1:8080/getinfo > /dev/null 2>&1; then
echo "Eclair is ready"
break
fi
echo "Waiting for Eclair... ($i/60)"
sleep 5
done
curl -s -u :eclairpassword http://127.0.0.1:8080/getinfo || { echo "Eclair failed to start"; docker logs ldk-node-eclair-1; exit 1; }

- name: Run Eclair integration tests
run: RUSTFLAGS="--cfg eclair_test" cargo test --test integration_tests_eclair -- --test-threads=1
17 changes: 15 additions & 2 deletions .github/workflows/lnd-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,20 @@ jobs:
run: echo "LND_DATA_DIR=$(mktemp -d)" >> $GITHUB_ENV

- name: Start bitcoind, electrs, and LND
run: docker compose -f docker-compose-lnd.yml up -d
run: docker compose --profile lnd up -d
env:
LND_DATA_DIR: ${{ env.LND_DATA_DIR }}

- name: Wait for LND to create macaroon
run: |
for i in $(seq 1 30); do
if [ -f "$LND_DATA_DIR/data/chain/bitcoin/regtest/admin.macaroon" ]; then
echo "LND macaroon found"
break
fi
echo "Waiting for LND macaroon... ($i/30)"
sleep 2
done
env:
LND_DATA_DIR: ${{ env.LND_DATA_DIR }}

Expand All @@ -51,6 +64,6 @@ jobs:

- name: Run LND integration tests
run: LND_CERT_PATH=$LND_DATA_DIR/tls.cert LND_MACAROON_PATH=$LND_DATA_DIR/data/chain/bitcoin/regtest/admin.macaroon
RUSTFLAGS="--cfg lnd_test" cargo test --test integration_tests_lnd -- --exact --show-output
RUSTFLAGS="--cfg lnd_test" cargo test --test integration_tests_lnd -- --show-output --test-threads=1
env:
LND_DATA_DIR: ${{ env.LND_DATA_DIR }}
4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,9 @@ clightningrpc = { version = "0.3.0-beta.8", default-features = false }
lnd_grpc_rust = { version = "2.10.0", default-features = false }
tokio = { version = "1.37", features = ["fs"] }

[target.'cfg(eclair_test)'.dev-dependencies]
reqwest = { version = "0.12", default-features = false, features = ["json", "rustls-tls"] }

[build-dependencies]
uniffi = { version = "0.29.5", features = ["build"], optional = true }

Expand All @@ -124,6 +127,7 @@ check-cfg = [
"cfg(tokio_unstable)",
"cfg(cln_test)",
"cfg(lnd_test)",
"cfg(eclair_test)",
"cfg(cycle_tests)",
]

Expand Down
73 changes: 0 additions & 73 deletions docker-compose-cln.yml

This file was deleted.

86 changes: 0 additions & 86 deletions docker-compose-lnd.yml

This file was deleted.

81 changes: 77 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: '3'

services:
bitcoin:
image: blockstream/bitcoind:27.2
Expand All @@ -14,11 +12,15 @@ services:
"-rpcuser=user",
"-rpcpassword=pass",
"-fallbackfee=0.00001",
"-rest"
"-rest",
"-zmqpubrawblock=tcp://0.0.0.0:28332",
"-zmqpubrawtx=tcp://0.0.0.0:28333"
]
ports:
- "18443:18443" # Regtest REST and RPC port
- "18444:18444" # Regtest P2P port
- "28332:28332" # ZMQ block port
- "28333:28333" # ZMQ tx port
networks:
- bitcoin-electrs
healthcheck:
Expand All @@ -41,10 +43,81 @@ services:
"--cookie=user:pass",
"--network=regtest",
"--daemon-rpc-addr=bitcoin:18443",
"--http-addr=0.0.0.0:3002"
"--http-addr=0.0.0.0:3002",
"--electrum-rpc-addr=0.0.0.0:50001"
]
ports:
- "3002:3002"
- "50001:50001"
networks:
- bitcoin-electrs

cln:
image: blockstream/lightningd:v23.08
platform: linux/amd64
profiles: ["cln"]
depends_on:
bitcoin:
condition: service_healthy
command:
[
"--bitcoin-rpcconnect=bitcoin",
"--bitcoin-rpcport=18443",
"--bitcoin-rpcuser=user",
"--bitcoin-rpcpassword=pass",
"--regtest",
"--experimental-anchors",
]
ports:
- "19846:19846"
- "9937:9937"
networks:
- bitcoin-electrs

lnd:
image: lightninglabs/lnd:v0.18.5-beta
container_name: ldk-node-lnd
profiles: ["lnd"]
depends_on:
bitcoin:
condition: service_healthy
volumes:
- ${LND_DATA_DIR:-/tmp/lnd-data}:/root/.lnd
ports:
- "8081:8081"
- "9735:9735"
command:
- "--noseedbackup"
- "--trickledelay=5000"
- "--alias=ldk-node-lnd-test"
- "--externalip=lnd:9735"
- "--bitcoin.active"
- "--bitcoin.regtest"
- "--bitcoin.node=bitcoind"
- "--bitcoind.rpchost=bitcoin:18443"
- "--bitcoind.rpcuser=user"
- "--bitcoind.rpcpass=pass"
- "--bitcoind.zmqpubrawblock=tcp://bitcoin:28332"
- "--bitcoind.zmqpubrawtx=tcp://bitcoin:28333"
- "--accept-keysend"
- "--rpclisten=0.0.0.0:8081"
- "--tlsextradomain=lnd"
- "--tlsextraip=0.0.0.0"
networks:
- bitcoin-electrs

eclair:
image: acinq/eclair:release-0.8.0
platform: linux/amd64
profiles: ["eclair"]
depends_on:
bitcoin:
condition: service_healthy
ports:
- "8080:8080"
- "9736:9736"
environment:
- JAVA_OPTS=-Declair.chain=regtest -Declair.server.port=9736 -Declair.api.enabled=true -Declair.api.binding-ip=0.0.0.0 -Declair.api.port=8080 -Declair.api.password=eclairpassword -Declair.bitcoind.host=bitcoin -Declair.bitcoind.rpcuser=user -Declair.bitcoind.rpcpassword=pass -Declair.bitcoind.rpcport=18443 -Declair.bitcoind.wallet=eclair -Declair.bitcoind.zmqblock=tcp://bitcoin:28332 -Declair.bitcoind.zmqtx=tcp://bitcoin:28333
networks:
- bitcoin-electrs

Expand Down
Loading
Loading