Skip to content

Commit

Permalink
Merge pull request #20 from MutinyWallet/fixes
Browse files Browse the repository at this point in the history
Add justfile, fix CI
  • Loading branch information
benthecarman authored Feb 16, 2024
2 parents f651a37 + 3f04436 commit 4f26771
Show file tree
Hide file tree
Showing 4 changed files with 1,695 additions and 8 deletions.
71 changes: 64 additions & 7 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,70 @@ env:
CARGO_TERM_COLOR: always

jobs:
build:

check_formatting:
name: Check Formatting
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: |
cargo +nightly-2023-10-24 fmt -- --check
- name: Check docs
run: cargo +nightly-2023-10-24 doc

core_tests_linux:
name: Core Tests on Linux
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --all-features --verbose
- name: Checkout
uses: actions/checkout@v2

- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2023-10-24
override: true
profile: minimal
components: clippy

- uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: cargo-${{ runner.os }}-core-tests-linux-v2-${{ hashFiles('**/Cargo.toml', '**/Cargo.lock') }}
restore-keys: |
cargo-${{ runner.os }}-core-tests-linux-v2-
cargo-${{ runner.os }}-
- name: Add targets
run: rustup target add x86_64-unknown-linux-gnu

- name: Run cargo clippy
run: cargo clippy --all-features --tests --package bitcoin-waila --target=x86_64-unknown-linux-gnu -- -D warnings

- name: Run cargo test
run: cargo test --package bitcoin-waila --target=x86_64-unknown-linux-gnu --all-features
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
/target
/Cargo.lock
Loading

0 comments on commit 4f26771

Please sign in to comment.