ci: update test job to use matrix strategy for multiple Python versions and switch to conda setup

fix: specify type for headers parameter in execute_transaction_request
fix: specify type for transaction_data parameter in process_transaction
deps: update tonutils dependency version to 2.0.5
This commit is contained in:
bohd4nx
2026-04-07 00:52:39 +03:00
parent d4ac44f698
commit 503baa9a94
4 changed files with 21 additions and 10 deletions
+18 -7
View File
@@ -27,21 +27,32 @@ jobs:
- run: ruff check . && black --check . --target-version py312 && mypy pyfragment - run: ruff check . && black --check . --target-version py312 && mypy pyfragment
test: test:
name: Tests name: Tests (Python ${{ matrix.python-version }})
runs-on: ubuntu-latest runs-on: ubuntu-latest
env: env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
COOKIES_JSON: ${{ secrets.COOKIES_JSON }} COOKIES_JSON: ${{ secrets.COOKIES_JSON }}
strategy:
fail-fast: false
matrix:
python-version: ["3.12", "3.13", "3.14"]
steps: steps:
- uses: actions/checkout@v6.0.2 - uses: actions/checkout@v6.0.2
- uses: actions/setup-python@v6.2.0 - name: Set up conda (Miniconda)
uses: conda-incubator/setup-miniconda@v3
with: with:
python-version: "3.12" auto-update-conda: true
python-version: ${{ matrix.python-version }}
activate-environment: pyfragment-test
auto-activate-base: false
- uses: astral-sh/setup-uv@v7.6.0 - name: Install package and dev dependencies
shell: bash -el {0}
run: pip install ".[dev]"
- run: uv pip install --system ".[dev]" - name: Run tests
shell: bash -el {0}
- run: pytest run: pytest
+1 -1
View File
@@ -114,7 +114,7 @@ async def fragment_request(
async def execute_transaction_request( async def execute_transaction_request(
session: httpx.AsyncClient, session: httpx.AsyncClient,
headers: dict, headers: dict[str, str],
tx_data: dict[str, Any], tx_data: dict[str, Any],
fragment_hash: str, fragment_hash: str,
) -> dict[str, Any]: ) -> dict[str, Any]:
+1 -1
View File
@@ -16,7 +16,7 @@ if TYPE_CHECKING:
from pyfragment.client import FragmentClient from pyfragment.client import FragmentClient
async def process_transaction(client: "FragmentClient", transaction_data: dict) -> str: async def process_transaction(client: "FragmentClient", transaction_data: dict[str, Any]) -> str:
"""Sign and broadcast a Fragment transaction to the TON network. """Sign and broadcast a Fragment transaction to the TON network.
Validates the payload structure, checks the wallet balance, decodes the Validates the payload structure, checks the wallet balance, decodes the
+1 -1
View File
@@ -27,7 +27,7 @@ classifiers = [
] ]
dependencies = [ dependencies = [
"httpx==0.28.1", "httpx==0.28.1",
"tonutils[pytoniq]==2.0.4", "tonutils[pytoniq]==2.0.5",
] ]
[project.optional-dependencies] [project.optional-dependencies]