Add CI config (#37)

* Add CI config

* Cargo fmt

* Add cargo clippy CI step
This commit is contained in:
ok300
2024-03-21 09:32:58 +00:00
committed by GitHub
parent 865733c0a9
commit d254496269
2 changed files with 44 additions and 3 deletions

41
.github/workflows/main.yml vendored Normal file
View File

@@ -0,0 +1,41 @@
name: CI
# Controls when the workflow will run
on:
# Triggers the workflow on push events but only for the "main" branch
push:
branches: [ main ]
pull_request:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
fmt:
name: Cargo Format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check Rust Formatting
run: |
cd lib
cargo fmt -- --check
cd ../cli
cargo fmt -- --check
clippy:
name: Cargo Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check Rust Clippy
run: |
cd lib
cargo clippy -- -D warnings
cd ../cli
cargo clippy -- -D warnings

View File

@@ -15,7 +15,7 @@ use boltz_client::{
Bolt11Invoice, Keypair,
};
use log::{debug, warn};
use lwk_common::{Signer, Singlesig, singlesig_desc};
use lwk_common::{singlesig_desc, Signer, Singlesig};
use lwk_signer::{AnySigner, SwSigner};
use lwk_wollet::{
elements::Address, full_scan_with_electrum_client, BlockchainBackend, ElectrumClient,
@@ -23,8 +23,8 @@ use lwk_wollet::{
};
use crate::{
Network, persist::Persister, OngoingSwap, SendPaymentResponse, SwapError, SwapLbtcResponse, WalletInfo,
WalletOptions,
persist::Persister, Network, OngoingSwap, SendPaymentResponse, SwapError, SwapLbtcResponse,
WalletInfo, WalletOptions,
};
// To avoid sendrawtransaction error "min relay fee not met"