Skip to content

Commit 43673da

Browse files
committed
Add Docker Compose & CI workflow for Eclair integration tests
Add `docker-compose-eclair.yml` running bitcoind (with ZMQ), electrs, and `acinq/eclair:v0.13.1`, and a GitHub Actions workflow that starts the containers and runs the Eclair integration test suite. Generated with the help of AI (Claude Code). Co-Authored-By: HAL 9000
1 parent 236cdc6 commit 43673da

File tree

2 files changed

+115
-0
lines changed

2 files changed

+115
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: CI Checks - Eclair Integration Tests
2+
3+
on: [push, pull_request]
4+
5+
concurrency:
6+
group: ${{ github.workflow }}-${{ github.ref }}
7+
cancel-in-progress: true
8+
9+
jobs:
10+
check-eclair:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@v4
15+
16+
- name: Start bitcoind, electrs, and Eclair
17+
run: docker compose -f docker-compose-eclair.yml up -d
18+
19+
- name: Wait for Eclair to be ready
20+
run: |
21+
for i in $(seq 1 30); do
22+
if curl -s -u :eclairpw -X POST http://127.0.0.1:8080/getinfo > /dev/null 2>&1; then
23+
echo "Eclair is ready"
24+
break
25+
fi
26+
echo "Waiting for Eclair... ($i)"
27+
sleep 5
28+
done
29+
30+
- name: Run Eclair integration tests
31+
run: RUSTFLAGS="--cfg eclair_test" cargo test --test integration_tests_eclair -- --exact --show-output

docker-compose-eclair.yml

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
services:
2+
bitcoin:
3+
image: blockstream/bitcoind:27.2
4+
platform: linux/amd64
5+
command:
6+
[
7+
"bitcoind",
8+
"-printtoconsole",
9+
"-regtest=1",
10+
"-rpcallowip=0.0.0.0/0",
11+
"-rpcbind=0.0.0.0",
12+
"-rpcuser=user",
13+
"-rpcpassword=pass",
14+
"-fallbackfee=0.00001",
15+
"-zmqpubrawblock=tcp://0.0.0.0:28332",
16+
"-zmqpubrawtx=tcp://0.0.0.0:28333"
17+
]
18+
ports:
19+
- "18443:18443" # Regtest RPC port
20+
- "18444:18444" # Regtest P2P port
21+
- "28332:28332" # ZMQ block port
22+
- "28333:28333" # ZMQ tx port
23+
networks:
24+
- bitcoin-electrs
25+
healthcheck:
26+
test: ["CMD", "bitcoin-cli", "-regtest", "-rpcuser=user", "-rpcpassword=pass", "getblockchaininfo"]
27+
interval: 5s
28+
timeout: 10s
29+
retries: 5
30+
31+
electrs:
32+
image: mempool/electrs:v3.2.0
33+
platform: linux/amd64
34+
depends_on:
35+
bitcoin:
36+
condition: service_healthy
37+
command:
38+
[
39+
"-vvvv",
40+
"--timestamp",
41+
"--jsonrpc-import",
42+
"--cookie=user:pass",
43+
"--network=regtest",
44+
"--daemon-rpc-addr=bitcoin:18443",
45+
"--http-addr=0.0.0.0:3002",
46+
"--electrum-rpc-addr=0.0.0.0:50001"
47+
]
48+
ports:
49+
- "3002:3002"
50+
- "50001:50001"
51+
networks:
52+
- bitcoin-electrs
53+
54+
eclair:
55+
image: acinq/eclair:v0.13.1
56+
depends_on:
57+
bitcoin:
58+
condition: service_healthy
59+
environment:
60+
- |
61+
JAVA_OPTS=
62+
-Xmx512m
63+
-Declair.chain=regtest
64+
-Declair.server.port=9736
65+
-Declair.api.enabled=true
66+
-Declair.api.binding-ip=0.0.0.0
67+
-Declair.api.port=8080
68+
-Declair.api.password=eclairpw
69+
-Declair.bitcoind.host=bitcoin
70+
-Declair.bitcoind.rpc-port=18443
71+
-Declair.bitcoind.rpc-user=user
72+
-Declair.bitcoind.rpc-password=pass
73+
-Declair.bitcoind.zmqblock=tcp://bitcoin:28332
74+
-Declair.bitcoind.zmqtx=tcp://bitcoin:28333
75+
-Declair.printToConsole
76+
ports:
77+
- "8080:8080" # API
78+
- "9736:9736" # P2P
79+
networks:
80+
- bitcoin-electrs
81+
82+
networks:
83+
bitcoin-electrs:
84+
driver: bridge

0 commit comments

Comments
 (0)