Skip to content

Commit

Permalink
Merge pull request #6 from MutinyWallet/add-ci
Browse files Browse the repository at this point in the history
  • Loading branch information
benthecarman authored Sep 15, 2023
2 parents 9dd2824 + 93af96a commit 25ca99b
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 5 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Tests

on:
pull_request:

jobs:
rust_tests:
name: Rust Checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
components: clippy, rustfmt
override: true
profile: minimal

- name: Setup trunk
uses: jetli/[email protected]
with:
version: 'latest'

- uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: cargo-${{ runner.os }}-rust-tests-${{ hashFiles('**/Cargo.toml') }}
restore-keys: |
cargo-${{ runner.os }}-rust-tests-
cargo-${{ runner.os }}-
- name: Check formatting
run: cargo fmt --check

- name: Check clippy
run: cargo clippy
7 changes: 2 additions & 5 deletions src/bolt11.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use tonic_openssl_lnd::lnrpc;
use serde::{Deserialize, Serialize};
use tonic_openssl_lnd::lnrpc;

use std::sync::{Arc, Mutex};

Expand Down Expand Up @@ -35,10 +35,7 @@ pub async fn request_bolt11(
inv.value = amt as i64;
}

let response = lightning_client
.add_invoice(inv)
.await?
.into_inner();
let response = lightning_client.add_invoice(inv).await?.into_inner();

response.payment_request
};
Expand Down

0 comments on commit 25ca99b

Please sign in to comment.