-
Couldn't load subscription status.
- Fork 18
Use Rust server in CI and add LDK Node integration tests #62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| name: Continuous Integration | ||
|
|
||
| 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:15 | ||
| 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 | ||
|
|
||
| - name: Build and Deploy VSS Server | ||
| run: | | ||
| cd rust | ||
| cargo build | ||
| cargo run server/vss-server-config.toml& | ||
| - name: Hit endpoint to verify service is up | ||
| run: | | ||
| # Wait for tomcat-startup | ||
| sleep 5 | ||
| # Put request with store='storeId' and key=k1 | ||
| hex=0A0773746F726549641A150A026B3110FFFFFFFFFFFFFFFFFF011A046B317631 | ||
| curl --data-binary "$(echo "$hex" | xxd -r -p)" http://localhost:8080/vss/putObjects | ||
| # Get request with store='storeId' and key=k1 | ||
| hex=0A0773746F7265496412026B31 | ||
| curl --data-binary "$(echo "$hex" | xxd -r -p)" http://localhost:8080/vss/getObject | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. would it be useful to assert here we get back |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| name: LDK Node Integration 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 | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. curious why we use |
||
| 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 | ||
| cargo build | ||
| cargo run 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 | ||
| RUSTFLAGS="--cfg vss_test" cargo test --test integration_tests_vss | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. didn't quite manage to reproduce the success here on my machine - it seems to fall into a forever loop, but I likely need to debug my machine / setup further. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ah all good now i cleaned up the existing databases on my machine and restarted from scratch, the full sequence worked thank you |
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: update / delete this comment ?