Skip to content

Conversation

@tvpeter
Copy link
Collaborator

@tvpeter tvpeter commented Nov 14, 2025

Description

Fixes #2

This PR adds a PR template, issue template, workflows for testing, fmt, and clippy.

Checklists

All Submissions:

  • I've signed all my commits
  • I followed the contribution guidelines
  • I ran cargo fmt and cargo clippy before committing

@tvpeter tvpeter requested a review from ValuedMammal November 14, 2025 15:23
@tvpeter tvpeter changed the title Add Github workflow for test, fmt, clippy and PR template Add Github workflows for test, fmt, clippy, PR and Issue templates Nov 17, 2025
Copy link
Collaborator

@oleonardolima oleonardolima left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good, I just left a few comments.

I think we can only commit the Cargo.lock once it's final, and moved to corepc repository. WDYT ?

Comment on lines 102 to 116
- name: Generate cache key
shell: bash
run: echo "${{ matrix.rust }} ${{ matrix.features }}" | tee .cache_key

- name: Cache cargo registry
uses: actions/cache@v4
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-${{ matrix.rust }}-cargo-registry-${{ hashFiles('.cache_key') }}-${{ hashFiles('**/Cargo.lock') }}

- name: Cache cargo index
uses: actions/cache@v4
with:
path: ~/.cargo/git
key: ${{ runner.os }}-${{ matrix.rust }}-cargo-index-${{ hashFiles('.cache_key') }}-${{ hashFiles('**/Cargo.lock') }}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's a better idea to follow the same CI approach as bdk_wallet, and use the actions-rust-lang/setup-rust-toolchain@v1 and it can handle all the cache and rust toolchain.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The idea was to follow the same CI as corepc ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The idea was to follow the same CI as corepc ?

No, it wasn't. I used the approach we used in bdk-cli

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, got it. I'll test the CI on my fork and see how it goes.

I don't mean to bikeshed on this PR, and we can update the CI to follow either bdk-wallet or bdk ones in a follow-up (if this already unblocks you for upcoming PRs).

Copy link
Collaborator

@oleonardolima oleonardolima Nov 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tvpeter Oh, you pushed a new commit as I was reviewing 😁. Let me know again when it's ready for review or my suggestions are not applicable.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tvpeter Oh, you pushed a new commit as I was reviewing 😁. Let me know again when it's ready for review or my suggestions are not applicable.

Oh apologies, I was addressing your yesterday's comments. Let me update to include the latest comments and will re-request a review. Thank you

Cargo.toml Outdated

[features]
default = [ "v30" ]
v30 = [ ]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: you can follow the same way as corepc: 30_0

@oleonardolima oleonardolima moved this to Needs Review in BDK Chain Nov 18, 2025
@tvpeter tvpeter mentioned this pull request Nov 18, 2025
5 tasks
- harmonize all actions to use actions-rust-lang/
setup-rust-toolchain with auto-caching
Comment on lines 148 to 165
- name: Install Bitcoin Core 27.0
run: |
wget https://bitcoincore.org/bin/bitcoin-core-30.0/bitcoin-30.0-x86_64-linux-gnu.tar.gz
tar xzf bitcoin-30.0-x86_64-linux-gnu.tar.gz
sudo install -m 0755 -o root -g root -t /usr/local/bin bitcoin-30.0/bin/*
- name: Start Bitcoin Core (regtest)
run: |
mkdir -p ~/.bitcoin
bitcoind -regtest -daemon -rpcuser=test -rpcpassword=test -rpcport=18443
sleep 5
- name: Run integration tests
run: cargo test ${{ matrix.features }} --test integration -- --ignored --test-threads=1
env:
BITCOIN_RPC_URL: http://localhost:18443
BITCOIN_RPC_USER: bitcoin
BITCOIN_RPC_PASS: bitcoin
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is needed, as ideally we should use the corepc-node (prev. bitcoind) for the integration tests, and it handles the download and wrapping (such as in bdk_testenv).

Can be done in a follow-up, let's get an initial CI running first :)

name = "bdk-rpc-client"
name = "bdk_rpc_client"
version = "0.1.0"
edition = "2024"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
edition = "2024"
edition = "2024"
rust-version = "1.85.0"
homepage = "https://bitcoindevkit.org"
repository = "https://github.com/bitcoindevkit/bdk_rpc_client"
documentation = "https://docs.rs/bdk_rpc_client"
description = "A minimal production-ready bitcoind RPC client for Bitcoin Dev Kit."
license = "MIT OR Apache-2.0"
readme = "README.md"

It's just a suggestion, can be done in a follow-up, and the description could be different too (if you have any other idea).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing authors field.

@oleonardolima
Copy link
Collaborator

I've tested the CI in my fork (see https://github.com/oleonardolima/bdk-rpc-client/actions/runs/19510871935/job/55850429271) and it worked just fine.

oleonardolima

This comment was marked as outdated.

@tvpeter
Copy link
Collaborator Author

tvpeter commented Nov 20, 2025

I think the only think that we might not need is setting up a bitcoind on CI, but can be updated in a follow-up too.

Yesterday's update removed the entire setup for Bitcoind. Please verify.

@luisschwab
Copy link
Member

luisschwab commented Nov 20, 2025

We should be using pinned hashes, add zizmor, cargo-audit and dependabot.

See https://github.com/luisschwab/koerier/tree/master/.github for an example on these.

@oleonardolima
Copy link
Collaborator

I think the only think that we might not need is setting up a bitcoind on CI, but can be updated in a follow-up too.

Yesterday's update removed the entire setup for Bitcoind. Please verify.

Oh, yes! All good now 🚀

- add audit, zizmor workflows and dependabot
@tvpeter
Copy link
Collaborator Author

tvpeter commented Nov 21, 2025

We should be using pinned hashes, add zizmor, cargo-audit and dependabot.

See https://github.com/luisschwab/koerier/tree/master/.github for an example on these.

I have included zizmor, audit and dependabot now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Needs Review

Development

Successfully merging this pull request may close these issues.

Add Github Workflow for PRs and Issues

3 participants