-
Notifications
You must be signed in to change notification settings - Fork 24
107 lines (94 loc) · 3 KB
/
ldk-node-integration.yml
File metadata and controls
107 lines (94 loc) · 3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
name: LDK Node Integration Tests
on: [push, pull_request]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-and-test:
strategy:
fail-fast: false
matrix:
platform: [ ubuntu-latest ]
toolchain: [ stable, 1.85.0 ] # 1.85.0 is the MSRV
runs-on: ${{ matrix.platform }}
services:
postgres:
image: postgres:latest
ports:
- 5432:5432
env:
POSTGRES_DB: postgres
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
path: vss-server
- name: Checkout LDK Node
uses: actions/checkout@v3
with:
repository: lightningdevkit/ldk-node
path: ldk-node
- name: Build and Deploy VSS Server
run: |
cd vss-server/rust
RUSTFLAGS="--cfg noop_authorizer" cargo build --no-default-features
./target/debug/vss-server server/vss-server-config.toml&
- name: Run LDK Node Integration tests
run: |
cd ldk-node
export TEST_VSS_BASE_URL="http://localhost:8080/vss"
RUSTFLAGS="--cfg vss_test" cargo test io::vss_store -- --test-threads=1
RUSTFLAGS="--cfg vss_test" cargo test --test integration_tests_vss -- --test-threads=1
test-in-memory:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
path: vss-server
- name: Checkout LDK Node
uses: actions/checkout@v3
with:
repository: lightningdevkit/ldk-node
path: ldk-node
- name: Create In-Memory config
run: |
mkdir -p vss-server/rust/server
cat > vss-server/rust/server/vss-server-config.toml <<EOF
[server_config]
host = "127.0.0.1"
port = 8080
store_type = "in-memory"
EOF
- name: Build & Start VSS Server
working-directory: vss-server/rust
run: |
cargo build --release --bin vss-server
./target/release/vss-server ./server/vss-server-config.toml --in-memory > server.log 2>&1 &
echo "Server PID: $!"
- name: Wait for VSS
run: |
for i in {1..30}; do
if curl -s http://127.0.0.1:8080/vss > /dev/null; then
echo "VSS ready"
exit 0
fi
sleep 1
done
echo "VSS failed:"
cat vss-server/rust/vss.log
exit 1
- name: Run LDK Node Integration tests
working-directory: ldk-node
run: |
export TEST_VSS_BASE_URL="http://127.0.0.1:8080/vss"
RUSTFLAGS="--cfg vss_test" cargo test io::vss_store
RUSTFLAGS="--cfg vss_test" cargo test --test integration_tests_vss