feat(test): add interop test harness for CLN, LND, Eclair #236
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: Run CLN keysend test with trace logging | |
| run: CLN_SOCKET_PATH=$CLN_DATA_DIR/regtest/lightning-rpc | |
| RUSTFLAGS="--cfg cln_test" cargo test --test integration_tests_cln test_cln_receive_keysend -- --show-output --test-threads=1 | |
| env: | |
| CLN_DATA_DIR: ${{ env.CLN_DATA_DIR }} | |
| - name: Dump CLN and LDK logs | |
| if: always() | |
| run: | | |
| echo "=== CLN log (last 100 lines) ===" | |
| docker compose -p ldk-node -f tests/docker/docker-compose-cln.yml logs cln 2>&1 | tail -100 | |
| echo "=== LDK log (last 300 lines) ===" | |
| find /tmp -maxdepth 3 -name "ldk_node.log" -exec tail -300 {} \; 2>/dev/null || echo "No LDK log found" | |
| env: | |
| CLN_DATA_DIR: ${{ env.CLN_DATA_DIR }} |