Skip to content

Commit f8b3d2d

Browse files
ci: add GitHub Actions workflow for LND integration tests
Configures CI to run LND tests using the Docker Compose environment. Closes lightningdevkit#505
1 parent a56230f commit f8b3d2d

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

.github/workflows/lnd-integration.yml

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: CI Checks - LND Integration Tests
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
check-lnd:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Checkout repository
10+
uses: actions/checkout@v4
11+
12+
- name: Create temporary directory for LND data
13+
id: create-temp-dir
14+
run: echo "LND_DATA_DIR=$(mktemp -d)" >> $GITHUB_ENV
15+
16+
- name: Start bitcoind, electrs, and LND
17+
run: docker compose -f docker-compose-lnd.yml up -d
18+
env:
19+
LND_DATA_DIR: ${{ env.LND_DATA_DIR }}
20+
21+
- name: Set permissions for LND data directory
22+
# In PR 4622 (https://github.com/lightningnetwork/lnd/pull/4622),
23+
# LND sets file permissions to 0700, preventing test code from accessing them.
24+
# This step ensures the test suite has the necessary permissions.
25+
run: sudo chmod -R 755 $LND_DATA_DIR
26+
env:
27+
LND_DATA_DIR: ${{ env.LND_DATA_DIR }}
28+
29+
- name: Run LND integration tests
30+
run: LND_CERT_PATH=$LND_DATA_DIR/tls.cert LND_MACAROON_PATH=$LND_DATA_DIR/data/chain/bitcoin/regtest/admin.macaroon
31+
RUSTFLAGS="--cfg lnd_test" cargo test --test integration_tests_lnd -- --exact --show-output
32+
env:
33+
LND_DATA_DIR: ${{ env.LND_DATA_DIR }}

0 commit comments

Comments
 (0)