Skip to content
Merged
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
8 changes: 4 additions & 4 deletions .github/workflows/check-protos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ name: Check Generated Protos
on:
push:
paths:
- 'ldk-server-protos/**'
- 'ldk-server-grpc/**'
pull_request:
paths:
- 'ldk-server-protos/**'
- 'ldk-server-grpc/**'
workflow_dispatch:

permissions:
Expand All @@ -28,12 +28,12 @@ jobs:
- name: Install protoc
run: sudo apt-get install -y protobuf-compiler
- name: Generate protos
run: RUSTFLAGS="--cfg genproto" cargo build -p ldk-server-protos
run: RUSTFLAGS="--cfg genproto" cargo build -p ldk-server-grpc
- name: Format generated code
run: rustup component add rustfmt && cargo fmt --all
- name: Check for differences
run: |
if ! git diff --exit-code; then
echo "error: Generated protobuf files are out of date. Run: RUSTFLAGS=\"--cfg genproto\" cargo build -p ldk-server-protos && cargo fmt --all"
echo "error: Generated protobuf files are out of date. Run: RUSTFLAGS=\"--cfg genproto\" cargo build -p ldk-server-grpc && cargo fmt --all"
exit 1
fi
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Integration Tests
name: End-to-End Tests

on: [ push, pull_request ]

Expand All @@ -10,23 +10,9 @@ concurrency:
cancel-in-progress: true

jobs:
integration-tests:
e2e-tests:
runs-on: ubuntu-latest

services:
rabbitmq:
image: rabbitmq:3
env:
RABBITMQ_DEFAULT_USER: guest
RABBITMQ_DEFAULT_PASS: guest
ports:
- 5672:5672
options: >-
--health-cmd "rabbitmqctl node_health_check"
--health-interval 10s
--health-timeout 5s
--health-retries 5

steps:
- name: Checkout code
uses: actions/checkout@v6
Expand All @@ -48,11 +34,6 @@ jobs:
- name: Set bitcoind environment variable
run: echo "BITCOIND_EXE=$( pwd )/bin/bitcoind-${{ runner.os }}-${{ runner.arch }}" >> "$GITHUB_ENV"

- name: Run RabbitMQ integration tests
run: cargo test --features integration-tests-events-rabbitmq --verbose --color=always -- --nocapture
env:
RUST_BACKTRACE: 1

- name: Run end-to-end tests
run: cargo test --manifest-path e2e-tests/Cargo.toml --verbose --color=always -- --test-threads=4 --nocapture
env:
Expand Down
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for build commands, testing, code style,
- **ldk-server** - Main daemon server (entry point: `src/main.rs`)
- **ldk-server-cli** - CLI client using clap
- **ldk-server-client** - Reqwest-based client library
- **ldk-server-protos** - Protocol buffer definitions and generated Rust code
- **ldk-server-grpc** - Protocol buffer definitions, generated Rust code, and shared gRPC primitives

## Development Rules

Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ cargo clippy --all-features -- -D warnings -A clippy::drop_non_drop # Lint (CI
## Protocol Buffer Generation

```bash
RUSTFLAGS="--cfg genproto" cargo build -p ldk-server-protos
RUSTFLAGS="--cfg genproto" cargo build -p ldk-server-grpc
cargo fmt --all
```

## Adding a New API Endpoint

1. Define request/response messages in `ldk-server-protos/src/proto/api.proto`
1. Define request/response messages in `ldk-server-grpc/src/proto/api.proto`
2. Regenerate protos (see above)
3. Create handler in `ldk-server/src/api/` (follow existing patterns)
4. Add route in `ldk-server/src/service.rs`
Expand Down
Loading