Skip to content

test(ci): add regtest environment with Esplora for integration tests#26

Merged
darioAnongba merged 1 commit intomainfrom
test/regtest-esplora-ci
Feb 25, 2026
Merged

test(ci): add regtest environment with Esplora for integration tests#26
darioAnongba merged 1 commit intomainfrom
test/regtest-esplora-ci

Conversation

@darioAnongba
Copy link
Collaborator

Summary

Add a Docker Compose-based regtest environment using blockstream/esplora for deterministic integration tests that don't depend on external networks (Mutinynet signet).

Changes

New files

  • integration-test/docker-compose.yml — Esplora service running on regtest
  • integration-test/init-esplora.sh — Funds the test wallet's first external address via bitcoin-cli
  • integration-test/run-integration.sh — Local orchestration script (start Esplora, fund wallet, run tests, teardown)
  • tests/node/integration/regtest.test.ts — Regtest integration tests mirroring the existing Mutinynet-based esplora.test.ts

CI changes

  • regtest-integration job added to build-lint-test.yml workflow
  • Runs on every PR: spins up Esplora Docker container, funds test wallet, executes regtest tests, tears down

Test coverage

  • Wallet creation on regtest network
  • Full scan with funded balance verification
  • Fee estimation
  • Transaction building, signing, and broadcasting
  • UTXO listing
  • Incremental sync
  • Changeset staging

Reference

Based on the pattern from MetaMask/snap-bitcoin-wallet.

Closes #16

@darioAnongba darioAnongba force-pushed the test/regtest-esplora-ci branch 3 times, most recently from c473ed0 to c20f0d3 Compare February 25, 2026 18:28
@darioAnongba darioAnongba marked this pull request as ready for review February 25, 2026 18:33
Add a Docker Compose-based regtest environment using blockstream/esplora
for deterministic integration tests independent of external networks.

Changes:
- Refactor esplora.test.ts to be network-agnostic via NETWORK and
  ESPLORA_URL environment variables (defaults to Mutinynet signet)
- Send to wallet's own address instead of hardcoded external address
- PSBT template test conditionally runs on signet only
- Add integration-test/ with docker-compose.yml, init-esplora.sh, and
  run-integration.sh for local regtest orchestration
- Add regtest-integration CI job with 3-minute Esplora startup timeout

Closes #16
@darioAnongba darioAnongba force-pushed the test/regtest-esplora-ci branch from c20f0d3 to af7b89e Compare February 25, 2026 18:50
@darioAnongba darioAnongba merged commit 860738b into main Feb 25, 2026
11 checks passed
@darioAnongba darioAnongba deleted the test/regtest-esplora-ci branch February 25, 2026 18:56
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.

test(ci): add regtest environment with Esplora for integration tests

1 participant