feat(test): add interop test harness for CLN, LND, Eclair #265
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 755 $CLN_DATA_DIR | |
| sudo find $CLN_DATA_DIR -type d -exec chmod 755 {} + | |
| sudo find $CLN_DATA_DIR -type f -exec chmod 644 {} + | |
| env: | |
| CLN_DATA_DIR: ${{ env.CLN_DATA_DIR }} | |
| - 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 }} |