Skip to content

Merge branch 'main' into rejecttoken #19

Merge branch 'main' into rejecttoken

Merge branch 'main' into rejecttoken #19

name: Secondary PR Check - Dependency Compatibility
on:
push:
paths:
- "pyproject.toml"
pull_request:
paths:
- "pyproject.toml"
workflow_dispatch:
permissions:
contents: read
jobs:
min-deps:
runs-on: ${{ (github.repository_owner != 'hiero-ledger' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork)) && 'ubuntu-latest' || 'hl-sdk-py-lin-md' }}
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.14"]
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0
with:
egress-policy: audit
- name: Checkout repository
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
fetch-depth: 0 # ensure full git history for SCM-based versioning
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
- name: Install uv
uses: astral-sh/setup-uv@11f9893b081a58869d3b5fccaea48c9e9e46f990 # v8.3.2
- name: Create virtual environment
run: uv venv
- name: Install minimum dependencies and tooling
run: |
# Minimum-deps compatibility check: use a non-editable install for stable packaging behavior.
uv sync --all-extras --resolution=lowest-direct --no-editable
- name: Show resolved core dependency versions
run: |
echo "Resolved core dependency versions:"
PATTERN='^(
protobuf|
grpcio|
cryptography|
requests|
pycryptodome|
eth-abi|
python-dotenv|
eth-keys|
rlp|
grpcio-tools|
ruff|
mypy|
typing-extensions|
pytest
)\s'
uv pip list | grep -E "$(echo "$PATTERN" | tr -d '\n ')"
- name: Generate Proto Files
run: |
uv run --resolution=lowest-direct python generate_proto.py
- name: Run unit tests (min deps)
run: |
uv run --resolution=lowest-direct pytest tests/unit -v