Skip to content

Commit

Permalink
ci: add electrs to func tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jp1ac4 committed Aug 22, 2024
1 parent dac26c8 commit 47ad084
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 47ad084

Please sign in to comment.