Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions .github/workflows/vss-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: VSS Tests

on: [push, pull_request]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build-and-test:
runs-on: ubuntu-latest

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: rust-lightning
- name: Checkout VSS
uses: actions/checkout@v3
with:
repository: lightningdevkit/vss-server
path: vss-server

- name: Build and Deploy VSS Server
run: |
cd vss-server/rust
cargo run server/vss-server-config.toml&
- name: Run VSS tests
run: |
ls -la
cd rust-lightning/lightning-persister
export TEST_VSS_BASE_URL="http://localhost:8080/vss"
RUSTFLAGS="--cfg vss_test" cargo test --features vss vss_store
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,5 @@ check-cfg = [
"cfg(require_route_graph_test)",
"cfg(simple_close)",
"cfg(peer_storage)",
"cfg(vss_test)",
]
4 changes: 4 additions & 0 deletions lightning-persister/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,15 @@ rustdoc-args = ["--cfg", "docsrs"]

[features]
tokio = ["dep:tokio"]
vss = ["dep:vss-client", "dep:tokio", "dep:rand", "dep:lightning-macros"]

[dependencies]
bitcoin = "0.32.2"
lightning = { version = "0.3.0", path = "../lightning" }
lightning-macros = { version = "0.2.0", path = "../lightning-macros", optional = true }
tokio = { version = "1.35", optional = true, default-features = false, features = ["rt-multi-thread"] }
vss-client = { package = "vss-client-ng", version = "0.4", optional = true }
rand = { version = "0.9.2", default-features = false, features = ["thread_rng"], optional = true }

[target.'cfg(windows)'.dependencies]
windows-sys = { version = "0.48.0", default-features = false, features = ["Win32_Storage_FileSystem", "Win32_Foundation"] }
Expand Down
3 changes: 3 additions & 0 deletions lightning-persister/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ extern crate criterion;

pub mod fs_store;

#[cfg(feature = "vss")]
pub mod vss_store;

mod utils;

#[cfg(test)]
Expand Down
Loading
Loading