Skip to content

fix for #6 and docstring, typehints, etc. #91

fix for #6 and docstring, typehints, etc.

fix for #6 and docstring, typehints, etc. #91

Workflow file for this run

name: Build and Test
on: [push]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ["ubuntu-latest", "ubuntu-20.04", "macos-latest", "windows-latest"]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install w/ test dependencies
run: |
python -m pip install -U pip
pip install .
pip install pytest pytest-cov
- name: Enable legacy algos openssl v3
if: matrix.os == 'ubuntu-latest'
run: |
sudo sed -i 's/#openssl_conf = openssl_init/openssl_conf = openssl_init/' /etc/ssl/openssl.cnf
echo ".include /etc/ssl/openssl-custom.cnf" | sudo tee -a /etc/ssl/openssl.cnf
cat <<EOF | sudo tee /etc/ssl/openssl-custom.cnf
[provider_sect]
default = default_sect
legacy = legacy_sect
[default_sect]
activate = 1
[legacy_sect]
activate = 1
EOF
- name: Deploy bitcoind - Linux
if: runner.os == 'Linux'
run: |
mkdir ~/bitcoind-data
docker run -d --name bitcoind-node -v ~/bitcoind-data:/root/.bitcoin -p 18443:18443 -p 18444:18444 blockstream/bitcoind:23.1 bitcoind -txindex -chain=regtest -server -rpcbind=0.0.0.0 -rpcallowip=0.0.0.0/0
- name: Test with pytest - Linux
if: runner.os == 'Linux'
run: |
mkdir ~/.bits
cat <<EOF | tee ~/.bits/config.json
{
"rpc_url": "http://localhost:18443",
"rpc_datadir": "/home/runner/bitcoind-data/regtest"
}
EOF
docker exec bitcoind-node ls -la /root/.bitcoin
docker exec bitcoind-node ls -la /root/.bitcoin/regtest
docker exec bitcoind-node chmod 644 /root/.bitcoin/regtest/.cookie
pytest
- name: Test with pytest (unit tests only) - macOS / Windows
if: runner.os == 'macOS' || runner.os == 'Windows'
run: |
pytest tests/unit