This repository was archived by the owner on Jul 12, 2026. It is now read-only.
Release/4.1.0 #82
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Check Python | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: check-python-${{ github.ref }} | |
| cancel-in-progress: true | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, reopened, labeled, unlabeled] | |
| workflow_dispatch: | |
| jobs: | |
| ruff: | |
| name: ruff | |
| runs-on: ubuntu-latest | |
| if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip-check-python') }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v8.0.0 | |
| with: | |
| enable-cache: true | |
| - name: Run ruff | |
| run: uvx ruff@0.15.12 check . | |
| pytest: | |
| name: pytest (unit tests) | |
| runs-on: ubuntu-latest | |
| if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip-check-python') }} | |
| env: | |
| RUST_BACKTRACE: full | |
| VIRTUAL_ENV: ${{ github.workspace }}/.venv | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install system dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y clang curl libssl-dev llvm libudev-dev protobuf-compiler | |
| - name: Utilize Shared Rust Cache | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v8.0.0 | |
| with: | |
| enable-cache: true | |
| python-version: "3.12" | |
| - name: Install dev deps + substrate-legacy | |
| run: | | |
| uv venv | |
| echo "${{ github.workspace }}/.venv/bin" >> $GITHUB_PATH | |
| uv pip install --group substrate-legacy | |
| uv pip uninstall scalecodec -y | |
| uv pip install '.[dev]' | |
| - name: Build and install package | |
| run: maturin develop --features extension-module | |
| - name: Run Python unit tests | |
| run: pytest tests/ -v --ignore=tests/test_wallet_legacy.py |