Skip to content

Introduce treefmt-nix as a universal formatter infra #833

Introduce treefmt-nix as a universal formatter infra

Introduce treefmt-nix as a universal formatter infra #833

Workflow file for this run

name: Build and Test Python
on:
pull_request:
paths:
- payjoin-ffi/**
env:
# Override the value from the rust-toolchain file
# This is necessary because even though the correct toolchain
# is explicitly specified for the rust-toolchain action,
# rustup honors the rust-toolchain file over the default
RUSTUP_TOOLCHAIN: 1.85
jobs:
build-python-and-test:
name: "Build and test python"
runs-on: ${{ matrix.os }}
defaults:
run:
working-directory: payjoin-ffi/python
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- name: "Checkout"
uses: actions/checkout@v4
- name: "Install Rust 1.85.0"
uses: dtolnay/[email protected]
- name: "Use cache"
uses: Swatinem/rust-cache@v2
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.14"
- name: Install a specific version of uv
uses: astral-sh/setup-uv@v6
with:
version: "0.8.2"
enable-cache: true
- name: "uv sync"
run: uv sync --all-extras
- name: "Generate payjoin-ffi.py and binaries"
run: bash ./scripts/generate_bindings.sh
- name: "Build wheel"
run: uv build --wheel
- name: "Install wheel"
run: uv run pip install ./dist/*.whl
- name: "Run tests"
run: uv run python -m unittest --verbose