Skip to content
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

mutiny-server #1084

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
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
35 changes: 35 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -285,3 +285,38 @@ jobs:

- name: Run cargo build
run: cargo build --all-features --package mutiny-core --target=${{ matrix.target }}

check_formatting-server:
name: Check Formatting mutiny-server
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v3

- uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: cargo-${{ runner.os }}-formatting-v2-${{ hashFiles('**/Cargo.toml', '**/Cargo.lock') }}
restore-keys: |
cargo-${{ runner.os }}-formatting-v2-
cargo-${{ runner.os }}-

- name: Install nightly toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2023-10-24
components: rustfmt
profile: minimal

- name: Check formatting
run: |
cd mutiny-server && cargo +nightly-2023-10-24 fmt -- --check

- name: Check docs
run: cd mutiny-server && cargo +nightly-2023-10-24 doc --target x86_64-unknown-linux-gnu

- name: Run cargo clippy
run: cd mutiny-server && cargo clippy --all-features --tests --target=x86_64-unknown-linux-gnu -- -D warnings
2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ members = [
"mutiny-wasm",
]

exclude = ["mutiny-server"]


# Tell `rustc` to optimize for small code size.
[profile.release.package.mutiny-core]
Expand Down
11 changes: 11 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,25 @@ clippy:
cargo clippy --all-features --tests --package mutiny-core --target=wasm32-unknown-unknown -- -D warnings
cargo clippy --all-features --tests --package mutiny-core --target=aarch64-apple-darwin -- -D warnings
cargo clippy --all-features --tests --package mutiny-wasm -- -D warnings
cd mutiny-server && cargo clippy --all-features --tests --target=aarch64-apple-darwin -- -D warnings

[linux]
clippy:
cargo clippy --all-features --tests --package mutiny-core --target=wasm32-unknown-unknown -- -D warnings
cargo clippy --all-features --tests --package mutiny-core --target=x86_64-unknown-linux-gnu -- -D warnings
cargo clippy --all-features --tests --package mutiny-wasm -- -D warnings
cd mutiny-server && cargo clippy --all-features --tests --target=x86_64-unknown-linux-gnu -- -D warnings

clippy-nix:
cargo clippy --all-features --tests --package mutiny-core --target=wasm32-unknown-unknown -- -D warnings
cargo clippy --all-features --tests --package mutiny-core --target=aarch64-unknown-linux-gnu -- -D warnings
cargo clippy --all-features --tests --package mutiny-wasm -- -D warnings
cd mutiny-server && cargo clippy --all-features --tests --target=aarch64-unknown-linux-gnu -- -D warnings

[macos]
run-signet:
cd mutiny-server && RUST_LOG=info cargo run --target aarch64-apple-darwin -- --lsp-url "https://signet-lsp.mutinywallet.com"

[linux]
run-signet:
cd mutiny-server && RUST_LOG=info cargo run --target x86_64-unknown-linux-gnu -- --lsp-url "https://signet-lsp.mutinywallet.com"
2 changes: 1 addition & 1 deletion mutiny-core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ pub struct Plan {
pub amount_sat: u64,
}

#[derive(Copy, Clone)]
#[derive(Copy, Clone, Serialize)]
pub struct MutinyBalance {
pub confirmed: u64,
pub unconfirmed: u64,
Expand Down
2 changes: 2 additions & 0 deletions mutiny-server/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# default database file
rocksdb
Loading
Loading