Skip to content

Commit f3c2230

Browse files
committed
Merge #65: Introduce wallet ABI. Major project refactoring.
ec8773c Introduce wallet ABI. Major project refactoring. (Kyryl R) Pull request description: Fixes: #64 Top commit has no ACKs. Tree-SHA512: b4c7ae1435b224873c29d380f08c5ff2c1b3a6f7336abc3b5b8345e011d5b3e0f5c4a1b81bb300c46c719a1e3204128a11cfe5a5ff01acac38f0a9f2a2e7bf95
2 parents 116b0eb + ec8773c commit f3c2230

116 files changed

Lines changed: 9376 additions & 11466 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/publish-core.yml

Lines changed: 0 additions & 66 deletions
This file was deleted.

.github/workflows/tests.yml

Lines changed: 53 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ permissions:
1212

1313
jobs:
1414
test:
15-
name: Build and test (matrix)
15+
name: Build and test (matrix, non-regtest)
1616
runs-on: ubuntu-latest
1717
strategy:
1818
fail-fast: false
@@ -36,7 +36,57 @@ jobs:
3636
- name: Build
3737
run: cargo build --workspace --all-features --verbose
3838

39-
- name: Test
40-
run: cargo test --workspace --all-features --no-fail-fast --verbose
39+
- name: Targeted wallet-abi library tests
40+
run: cargo test -p wallet-abi --lib --verbose
4141

42+
- name: Targeted CLI unit tests
43+
run: cargo test -p cli --lib --verbose
4244

45+
- name: Test (excluding regtest-dependent contracts)
46+
run: cargo test --workspace --all-features --exclude contracts --no-fail-fast --verbose
47+
48+
contracts-regtest:
49+
name: Contracts regtest tests
50+
runs-on: ubuntu-latest
51+
52+
steps:
53+
- name: Checkout
54+
uses: actions/checkout@v4
55+
56+
- name: Setup Rust (stable)
57+
uses: actions-rust-lang/setup-rust-toolchain@v1
58+
with:
59+
toolchain: stable
60+
61+
- name: Cache cargo
62+
uses: Swatinem/rust-cache@v2
63+
with:
64+
cache-on-failure: true
65+
66+
- name: Setup regtest binaries
67+
run: |
68+
set -euo pipefail
69+
BIN_DIR="$RUNNER_TEMP/lwk-bin"
70+
mkdir -p "$BIN_DIR"
71+
cd "$BIN_DIR"
72+
73+
ELECTRS_FILENAME="electrs_linux_esplora_027e38d3ebc2f85b28ae76f8f3448438ee4fc7b1_liquid.zip"
74+
ELECTRS_SHA256="a63a314c16bc6642fc060bbc19bd1d54ebf86b42188ff2a11c705177c1eb22f7"
75+
wget "https://github.com/RCasatta/electrsd/releases/download/electrs_releases/${ELECTRS_FILENAME}"
76+
echo "${ELECTRS_SHA256} ${ELECTRS_FILENAME}" | sha256sum -c -
77+
unzip -o "${ELECTRS_FILENAME}"
78+
chmod +x "${BIN_DIR}/electrs"
79+
80+
ELEMENTSD_VERSION="23.3.1"
81+
ELEMENTSD_FILENAME="elements-${ELEMENTSD_VERSION}-x86_64-linux-gnu.tar.gz"
82+
ELEMENTSD_SHA256="864e3a8240137c4e948ecae7c526ccb363771351ea68737a14c682025d5fedaa"
83+
curl -Ls "https://github.com/ElementsProject/elements/releases/download/elements-${ELEMENTSD_VERSION}/${ELEMENTSD_FILENAME}" -o "${ELEMENTSD_FILENAME}"
84+
echo "${ELEMENTSD_SHA256} ${ELEMENTSD_FILENAME}" | sha256sum -c -
85+
tar -xzf "${ELEMENTSD_FILENAME}"
86+
chmod +x "${BIN_DIR}/elements-${ELEMENTSD_VERSION}/bin/elementsd"
87+
88+
echo "ELECTRS_LIQUID_EXEC=${BIN_DIR}/electrs" >> "$GITHUB_ENV"
89+
echo "ELEMENTSD_EXEC=${BIN_DIR}/elements-${ELEMENTSD_VERSION}/bin/elementsd" >> "$GITHUB_ENV"
90+
91+
- name: Test contracts (regtest)
92+
run: cargo test -p contracts --all-features --no-fail-fast --verbose -- --test-threads=1

0 commit comments

Comments
 (0)