Skip to content

Commit

Permalink
Merge pull request #2242 from CounterpartyXCP/develop
Browse files Browse the repository at this point in the history
v10.4.0
  • Loading branch information
ouziel-slama authored Sep 18, 2024
2 parents 929d8aa + c269d31 commit 827ae09
Show file tree
Hide file tree
Showing 118 changed files with 64,259 additions and 37,354 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/regtest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Regtest test

on:
push:
branches: "**"

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
default: true
- name: Install dependencies
run: |
sudo apt-get update -y
sudo apt-get install -y libgirepository1.0-dev libleveldb-dev nodejs npm
python -m pip install --upgrade pip
pip install maturin sh rich pyyaml
cd counterparty-rs && pip install -e . && cd ..
cd counterparty-core && pip install -e . && cd ..
pip install evdev
git clone https://github.com/CounterpartyXCP/addrindexrs.git
cd addrindexrs
cargo install --path=.
wget https://bitcoincore.org/bin/bitcoin-core-27.1/bitcoin-27.1-x86_64-linux-gnu.tar.gz
tar -xvf bitcoin-27.1-x86_64-linux-gnu.tar.gz
sudo cp bitcoin-27.1/bin/bitcoin-cli /usr/local/bin/bitcoin-cli
sudo cp bitcoin-27.1/bin/bitcoind /usr/local/bin/bitcoind
sudo cp bitcoin-27.1/bin/bitcoin-wallet /usr/local/bin/bitcoin-wallet
npm install dredd --global
- name: Run regtest tests
run: |
cd counterparty-core
python3 counterpartycore/test/regtest/testscenarios.py
10 changes: 5 additions & 5 deletions .github/workflows/test_compose.sh
Original file line number Diff line number Diff line change
Expand Up @@ -102,24 +102,24 @@ CURRENT_HEIGHT=$(curl http://localhost:4000/v2/ --silent | jq '.result.counterpa
REPARSE_FROM=$(($CURRENT_HEIGHT-50))

# Stop, reparse and start counterparty-core mainnet
echo "" > $(docker inspect --format='{{.LogPath}}' counterparty-core-counterparty-core-1)
docker compose --profile mainnet stop counterparty-core
docker compose --profile mainnet run counterparty-core reparse $REPARSE_FROM \
--backend-connect=bitcoind \
--indexd-connect=addrindexrs \
--rpc-host=0.0.0.0 \
--api-host=0.0.0.0

echo "" > $(docker inspect --format='{{.LogPath}}' counterparty-core-counterparty-core-1)

docker compose --profile mainnet up -d counterparty-core

# wait for counterparty-core to be ready
while [ "$(docker compose logs counterparty-core 2>&1 | grep 'API Watcher - Catch up completed')" = "" ]; do
while [ "$(docker compose logs counterparty-core 2>&1 | grep 'Watching for new blocks...')" = "" ]; do
echo "Waiting for counterparty-core mainnet to be ready"
sleep 1
done

# Run dredd test
dredd


# Run compare hashes test
. "$HOME/.profile"
cd counterparty-core
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Docker Compose

on:
push:
branches: ['develop', 'master', 'testcompose']
branches: ['develop', 'master', 'preprelease']

jobs:
build:
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,6 @@ dist/
.env.leave
.venv/
test-results/

# cursor
._*
Loading

0 comments on commit 827ae09

Please sign in to comment.