feat(test): add interop test harness for CLN, LND, Eclair #247
This file contains hidden or 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
| name: CI Checks - CLN Integration Tests | |
| on: [push, pull_request] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| check-cln: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Create temporary directory for CLN data | |
| run: echo "CLN_DATA_DIR=$(mktemp -d)" >> $GITHUB_ENV | |
| - name: Start bitcoind, electrs, and lightningd | |
| run: docker compose -p ldk-node -f tests/docker/docker-compose-cln.yml up -d | |
| env: | |
| CLN_DATA_DIR: ${{ env.CLN_DATA_DIR }} | |
| - name: Wait for CLN to be ready | |
| run: | | |
| for i in $(seq 1 30); do | |
| if docker exec ldk-node-cln-1 lightning-cli --regtest getinfo 2>/dev/null | grep -q '"id"'; then | |
| echo "CLN is ready" | |
| break | |
| fi | |
| echo "Waiting for CLN... ($i/30)" | |
| sleep 2 | |
| done | |
| docker exec ldk-node-cln-1 lightning-cli --regtest getinfo || { | |
| echo "ERROR: CLN not responding" | |
| docker compose -p ldk-node -f tests/docker/docker-compose-cln.yml logs cln | |
| exit 1 | |
| } | |
| - name: Set permissions for CLN data directory | |
| run: | | |
| sudo chown -R $(id -u):$(id -g) $CLN_DATA_DIR | |
| sudo chmod -R 755 $CLN_DATA_DIR | |
| env: | |
| CLN_DATA_DIR: ${{ env.CLN_DATA_DIR }} | |
| - name: Dump CLN peer features (debug) | |
| run: | | |
| docker exec ldk-node-cln-1 lightning-cli --regtest getinfo | head -5 | |
| echo "=== CLN own features ===" | |
| docker exec ldk-node-cln-1 lightning-cli --regtest getinfo | grep -i "feature\|splice\|quiesc" || true | |
| - name: Run CLN integration tests | |
| run: CLN_SOCKET_PATH=$CLN_DATA_DIR/regtest/lightning-rpc | |
| RUSTFLAGS="--cfg cln_test" cargo test --test integration_tests_cln -- --show-output --test-threads=1 | |
| env: | |
| CLN_DATA_DIR: ${{ env.CLN_DATA_DIR }} | |
| - name: Dump CLN logs and peer features | |
| if: always() | |
| run: | | |
| echo "=== CLN listpeers ===" | |
| docker exec ldk-node-cln-1 lightning-cli --regtest listpeers 2>/dev/null | python3 -c " | |
| import sys, json | |
| data = json.load(sys.stdin) | |
| for p in data.get('peers', []): | |
| print(f'Peer: {p.get(\"id\", \"?\")[:16]}...') | |
| print(f' Features: {p.get(\"features\", \"none\")}') | |
| print(f' Connected: {p.get(\"connected\", \"?\")}') | |
| " 2>/dev/null || docker exec ldk-node-cln-1 lightning-cli --regtest listpeers 2>/dev/null | head -30 || echo "CLN not available" | |
| echo "=== CLN container log (last 50 lines) ===" | |
| docker compose -p ldk-node -f tests/docker/docker-compose-cln.yml logs cln 2>&1 | tail -50 |