Skip to content

feat(sdk): add gateway utility helpers for CLI and bot consumers #1462

feat(sdk): add gateway utility helpers for CLI and bot consumers

feat(sdk): add gateway utility helpers for CLI and bot consumers #1462

Workflow file for this run

name: Rust
on:
push:
branches:
- master
pull_request:
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout sources
uses: actions/checkout@v6
- name: Cache Bitcoin Core
id: cache-bitcoin
uses: actions/cache@v5
with:
path: /usr/local/bin/bitcoind
key: bitcoin-core-0.29.3
- name: Download and Install Bitcoin Core
if: steps.cache-bitcoin.outputs.cache-hit != 'true'
run: |
wget --quiet https://bitcoincore.org/bin/bitcoin-core-29.3/bitcoin-29.3-x86_64-linux-gnu.tar.gz
tar -xvf bitcoin-29.3-x86_64-linux-gnu.tar.gz
sudo mv bitcoin-29.3/bin/bitcoind /usr/local/bin/
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
- name: Set variables
run: |
echo "TOOLCHAIN=$(rustup show active-toolchain | cut -d ' ' -f1)" >> $GITHUB_ENV
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@nightly
with:
toolchain: ${{ env.TOOLCHAIN }}
components: rustfmt, clippy, rust-docs
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
- name: Cache cargo install binaries
uses: actions/cache@v5
id: cargo-bin-cache
with:
path: ~/.cargo/bin/electrs
key: ${{ runner.os }}-cargo-bin-electrs-6d182d8d0801a40c44a26000ae731a38c1d96218
- name: Install Electrs
if: steps.cargo-bin-cache.outputs.cache-hit != 'true'
run: cargo install --git https://github.com/blockstream/electrs --rev 6d182d8d0801a40c44a26000ae731a38c1d96218 --bin electrs
- name: Format check
run: cargo fmt --all --check
- name: Clippy
run: cargo clippy --workspace --tests --all-features
env:
RUSTFLAGS: "-D warnings"
- name: Run tests
run: cargo test --workspace --all-features