From 42710e4ab9bffc6638c40892df3409074f11507e Mon Sep 17 00:00:00 2001 From: jp1ac4 <121959000+jp1ac4@users.noreply.github.com> Date: Thu, 22 Aug 2024 14:18:49 +0100 Subject: [PATCH] ci: add electrs to func tests --- .cirrus.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/.cirrus.yml b/.cirrus.yml index 8bfbfa557..bbafa3cd4 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -17,18 +17,35 @@ task: - USE_MIN_BITCOIN_VERSION: 'TRUE' - USE_MIN_BITCOIN_VERSION: 'FALSE' - USE_TAPROOT: 1 + BITCOIN_BACKEND_TYPE: 'bitcoind' + - USE_TAPROOT: 1 + BITCOIN_BACKEND_TYPE: 'electrs' + - USE_TAPROOT: 0 + BITCOIN_BACKEND_TYPE: 'electrs' - name: 'RPC functional tests' env: TEST_GROUP: tests/test_rpc.py matrix: - USE_TAPROOT: 0 + BITCOIN_BACKEND_TYPE: 'bitcoind' + - USE_TAPROOT: 1 + BITCOIN_BACKEND_TYPE: 'bitcoind' + - USE_TAPROOT: 0 + BITCOIN_BACKEND_TYPE: 'electrs' - USE_TAPROOT: 1 + BITCOIN_BACKEND_TYPE: 'electrs' - name: 'Chain functional tests' env: TEST_GROUP: tests/test_chain.py matrix: - USE_TAPROOT: 0 + BITCOIN_BACKEND_TYPE: 'bitcoind' - USE_TAPROOT: 1 + BITCOIN_BACKEND_TYPE: 'bitcoind' + - USE_TAPROOT: 0 + BITCOIN_BACKEND_TYPE: 'electrs' + - USE_TAPROOT: 1 + BITCOIN_BACKEND_TYPE: 'electrs' cargo_registry_cache: folders: $CARGO_HOME/registry @@ -57,6 +74,7 @@ task: test_script: | set -xe + # We always need bitcoind, even when using a different backend. if [ "$USE_MIN_BITCOIN_VERSION" = "TRUE" ]; then # Download the minimum required bitcoind binary curl -O https://bitcoincore.org/bin/bitcoin-core-24.0.1/bitcoin-24.0.1-x86_64-linux-gnu.tar.gz @@ -72,6 +90,14 @@ task: export BITCOIND_PATH=bitcoin-26.0/bin/bitcoind fi + if [ "$BITCOIN_BACKEND_TYPE" = "electrs" ]; then + curl -OL https://github.com/RCasatta/electrsd/releases/download/electrs_releases/electrs_linux_v0.9.11.zip + echo "2b2f8aef35cd8e16e109b948a903d010aa472f6cdf2147d47e01fd95cd1785da electrs_linux_v0.9.11.zip" | sha256sum -c + unzip electrs_linux_v0.9.11.zip + chmod 754 electrs + export ELECTRS_PATH=$PWD/electrs + fi + # The misc tests have a backward compat test that need the path to a previous version of Liana. # For now it requires using 0.3. if [ "$TEST_GROUP" = "tests/test_misc.py" ]; then