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

Use signet for live tests #531

Merged
merged 4 commits into from
May 14, 2024

Conversation

thunderbiscuit
Copy link
Member

@thunderbiscuit thunderbiscuit commented May 10, 2024

This PR moves the live tests from testnet to signet. Merge after #518.

Note that the tests below do not actually run the live tests. The runs for the live tests triggered manually is here. Note: the balance on the wallet was 0. The new run is here.

Copy link

coderabbitai bot commented May 10, 2024

Walkthrough

The recent updates primarily focus on standardizing the Rust toolchain across various GitHub workflows to version 1.77.1, enhancing consistency in the build environment. Additionally, there's a shift in network settings from Testnet to Signet in both Android and Swift projects, improving testing frameworks by using consistent URLs and updating network parameters. These changes aim to streamline development processes and testing consistency.

Changes

File Path Change Summary
.github/workflows/live-tests.yaml Specified working directory and script for Swift package; added Rust 1.77.1 installation step.
.github/workflows/publish-python.yaml
.github/workflows/test-python.yaml
Updated Rust toolchain to fixed version 1.77.1.
bdk-android/.../LiveTxBuilderTest.kt Updated URLs and network parameters for Signet; added new descriptors and wallet initialization.
bdk-swift/.../LiveWalletTests.swift Switched to using constants for URLs; updated network to Signet in descriptor and wallet setups.

Recent Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between e9a7628 and f27bada.
Files selected for processing (11)
  • .github/workflows/live-tests.yaml (2 hunks)
  • .github/workflows/publish-python.yaml (1 hunks)
  • .github/workflows/test-python.yaml (1 hunks)
  • bdk-android/lib/src/androidTest/kotlin/org/bitcoindevkit/LiveTxBuilderTest.kt (3 hunks)
  • bdk-android/lib/src/androidTest/kotlin/org/bitcoindevkit/LiveWalletTest.kt (5 hunks)
  • bdk-jvm/lib/src/test/kotlin/org/bitcoindevkit/LiveTxBuilderTest.kt (3 hunks)
  • bdk-jvm/lib/src/test/kotlin/org/bitcoindevkit/LiveWalletTest.kt (3 hunks)
  • bdk-python/tests/test_live_tx_builder.py (5 hunks)
  • bdk-python/tests/test_live_wallet.py (5 hunks)
  • bdk-swift/Tests/BitcoinDevKitTests/LiveTxBuilderTests.swift (4 hunks)
  • bdk-swift/Tests/BitcoinDevKitTests/LiveWalletTests.swift (3 hunks)
Files skipped from review due to trivial changes (2)
  • .github/workflows/test-python.yaml
  • bdk-jvm/lib/src/test/kotlin/org/bitcoindevkit/LiveTxBuilderTest.kt
Additional comments not posted (17)
.github/workflows/live-tests.yaml (2)

51-52: Ensure the script build-local-swift.sh exists and has appropriate execute permissions.

Verification successful

The verification process has confirmed that the script build-local-swift.sh exists within the bdk-swift directory and has the necessary execute permissions. This aligns with the requirements mentioned in the review comment, ensuring that the workflow action can execute the script as intended.

Script Verification Complete:

  • The script build-local-swift.sh is present and executable.
Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Check if the build script exists and is executable.

# Test: Check for file existence and execute permission. Expect: File exists and is executable.
if [ -f "bdk-swift/build-local-swift.sh" ] && [ -x "bdk-swift/build-local-swift.sh" ]; then
  echo "Script is ready to use."
else
  echo "Script missing or not executable."
fi

Length of output: 144


79-82: The explicit setting of the Rust toolchain version to 1.77.1 is a good practice for ensuring consistent build environments.

bdk-jvm/lib/src/test/kotlin/org/bitcoindevkit/LiveWalletTest.kt (2)

27-38: Initialization of wallet and Esplora client with Signet network and subsequent balance check are correctly implemented.


52-65: Proper setup and execution of transaction broadcasting test on the Signet network.

bdk-android/lib/src/androidTest/kotlin/org/bitcoindevkit/LiveWalletTest.kt (2)

Line range hint 29-42: Correct implementation of wallet balance synchronization test on the Signet network for Android.


Line range hint 56-86: Proper setup and execution of transaction broadcasting test on the Signet network for Android.

bdk-android/lib/src/androidTest/kotlin/org/bitcoindevkit/LiveTxBuilderTest.kt (2)

29-42: Correct implementation of transaction building test on the Signet network for Android.


54-68: Proper setup and execution of complex transaction building test on the Signet network for Android.

bdk-python/tests/test_live_wallet.py (2)

Line range hint 17-39: Correct implementation of wallet balance synchronization test on the Signet network for Python.


Line range hint 53-94: Proper setup and execution of transaction broadcasting test on the Signet network for Python.

bdk-python/tests/test_live_tx_builder.py (2)

Line range hint 17-43: Correct implementation of transaction building test on the Signet network for Python.


Line range hint 53-113: Proper setup and execution of complex transaction building test on the Signet network for Python.

bdk-swift/Tests/BitcoinDevKitTests/LiveWalletTests.swift (2)

32-55: Correct implementation of wallet balance synchronization test on the Signet network for Swift.


70-98: Proper setup and execution of transaction broadcasting test on the Signet network for Swift.

bdk-swift/Tests/BitcoinDevKitTests/LiveTxBuilderTests.swift (2)

32-57: Correct implementation of transaction building test on the Signet network for Swift.


Line range hint 70-113: Proper setup and execution of complex transaction building test on the Signet network for Swift.

.github/workflows/publish-python.yaml (1)

35-39: Specify Rust toolchain version to ensure consistent builds.


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

Note: Auto-reply has been disabled for this repository by the repository owner. The CodeRabbit bot will not respond to your replies unless it is explicitly tagged.

  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Collaborator

@reez reez left a comment

Choose a reason for hiding this comment

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

ACK f27bada

@thunderbiscuit thunderbiscuit merged commit f27bada into bitcoindevkit:master May 14, 2024
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants