Skip to content

Weekly - All Tests (Base Modules) #768

Weekly - All Tests (Base Modules)

Weekly - All Tests (Base Modules) #768

# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Weekly - All Tests (Base Modules)
on:
schedule:
- cron: "0 0 * * 6"
pull_request:
branches: [ master ]
workflow_dispatch:
jobs:
build:
timeout-minutes: 20 # allow extra time for occasional slow tests
runs-on: ${{matrix.os}}
strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04, windows-latest, macos-latest] # Test all supported operating systems
python-version: ['3.10', '3.11', '3.12', '3.13', '3.14'] # Test all supported versions of Python
backend: [coincurve]
include:
# Also exercise the wallycore and pure-python secp256k1 backends on Linux
- os: ubuntu-24.04
backend: wallycore
- os: ubuntu-24.04
backend: purepython
exclude:
- os: windows-latest
python-version: '3.13'
steps:
- uses: actions/checkout@v7
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install Build Environment
run: |
if [ "$RUNNER_OS" == "macOS" ]; then
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install autoconf automake libffi libtool pkg-config gnu-sed swig
fi
shell: bash
- name: Install dependencies (coincurve backend)
if: matrix.backend == 'coincurve'
shell: bash
run: |
python -m pip install --upgrade pip
# Install everything except coincurve first (this pulls in wallycore, the
# fallback backend), then try to add coincurve on top. On platforms where
# coincurve cannot be built (e.g. Python 3.14), the job still runs using
# the wallycore fallback instead of failing the install step.
grep -viE 'coincurve' requirements.txt > "$RUNNER_TEMP/btcr-reqs.txt"
pip install -r "$RUNNER_TEMP/btcr-reqs.txt"
# Per-Python-version coincurve pin (matches available prebuilt wheels):
# 3.13 -> only 21.0.0 has a wheel; 3.14 -> no wheel, fall back to wallycore.
case "${{ matrix.python-version }}" in
3.13) pip install coincurve==21.0.0 || true ;;
*) pip install coincurve==21.0.0 || pip install coincurve==20.0.0 || true ;;
esac
- name: Install dependencies (wallycore backend)
if: matrix.backend == 'wallycore'
shell: bash
run: |
python -m pip install --upgrade pip
pip install wallycore
grep -viE 'coincurve|wallycore' requirements.txt > "$RUNNER_TEMP/btcr-reqs.txt"
pip install -r "$RUNNER_TEMP/btcr-reqs.txt"
- name: Install dependencies (pure-python backend)
if: matrix.backend == 'purepython'
shell: bash
run: |
python -m pip install --upgrade pip
# Also exclude pycryptodome and protobuf so the pure-python AES,
# ChaCha20-Poly1305, and Keccak fallbacks are exercised.
grep -viE 'coincurve|wallycore|pycryptodome|protobuf' requirements.txt > "$RUNNER_TEMP/btcr-reqs.txt"
pip install -r "$RUNNER_TEMP/btcr-reqs.txt"
- name: Install green on Windows (workaround for hanging tests on Github Actions)
if: runner.os == 'Windows'
run: pip install green
- name: Run All Tests
env:
BTCR_BACKEND: ${{ matrix.backend }}
run: |
python run-all-tests.py -vv