Repository navigation
Python examples: move to SDK 1.44.0 and use the Join helper #1997
Workflow file for this run
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: Python SDK CI | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - "sdk-python/**" | |
| - "sdk-rust/Cargo.lock" | |
| - "sdk-rust/Cargo.toml" | |
| - "sdk-rust/crates/dex-blob-cache/**" | |
| - "sdk-rust/crates/dex-blob-cache-python/**" | |
| - "cli/**" | |
| - "server-zd/**" | |
| - "s3local/**" | |
| - "web/**" | |
| - "protos/**" | |
| - "codecov.yml" | |
| - ".github/workflows/sdk-python-ci.yml" | |
| pull_request: | |
| paths: | |
| - "sdk-python/**" | |
| - "sdk-rust/Cargo.lock" | |
| - "sdk-rust/Cargo.toml" | |
| - "sdk-rust/crates/dex-blob-cache/**" | |
| - "sdk-rust/crates/dex-blob-cache-python/**" | |
| - "cli/**" | |
| - "server-zd/**" | |
| - "s3local/**" | |
| - "web/**" | |
| - "protos/**" | |
| - "codecov.yml" | |
| - ".github/workflows/sdk-python-ci.yml" | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| env: | |
| RUSTUP_TOOLCHAIN: "1.97.1" | |
| concurrency: | |
| group: sdk-python-${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| contracts: | |
| name: User contracts (Python ${{ matrix.python-version }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.11", "3.13"] | |
| defaults: | |
| run: | |
| working-directory: sdk-python | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Install Rust | |
| run: rustup toolchain install 1.97.1 --profile minimal | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0 | |
| with: | |
| version: "0.12.2" | |
| python-version: ${{ matrix.python-version }} | |
| working-directory: sdk-python | |
| enable-cache: true | |
| - name: Install dependencies | |
| run: uv sync --locked --reinstall-package dex-python-sdk | |
| - name: Test contracts | |
| run: uv run --frozen pytest tests/test_*.py | |
| - name: Check static types with mypy | |
| run: uv run --frozen mypy --strict tests/typecheck_contracts.py tests/integ | |
| - name: Check static types with pyright | |
| run: uv run --frozen pyright tests/typecheck_contracts.py tests/integ | |
| lint: | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: sdk-python | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Install Rust | |
| run: rustup toolchain install 1.97.1 --profile minimal | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0 | |
| with: | |
| version: "0.12.2" | |
| python-version: "3.11" | |
| working-directory: sdk-python | |
| enable-cache: true | |
| - name: Install dependencies | |
| run: uv sync --locked | |
| - name: Validate public API documentation | |
| run: uv run --frozen python scripts/check_public_docs.py | |
| - name: Verify generated protobuf stubs | |
| run: | | |
| make -C ../protos proto-python | |
| git diff --exit-code -- dex/dexpb | |
| - name: Run contract linters | |
| run: | | |
| uv run --frozen pre-commit run \ | |
| --show-diff-on-failure \ | |
| --color=always \ | |
| --files \ | |
| dex/__init__.py \ | |
| dex/_attribute_reads.py \ | |
| dex/_credential_transport.py \ | |
| dex/_grpc_errors.py \ | |
| dex/_invocation_context.py \ | |
| dex/_native.pyi \ | |
| dex/_pull_worker.py \ | |
| dex/_server_protocol.py \ | |
| dex/_utils.py \ | |
| dex/_value_hydrator.py \ | |
| dex/_value_mapper.py \ | |
| dex/_worker_dispatcher.py \ | |
| dex/attribute.py \ | |
| dex/attribute_match.py \ | |
| dex/attribute_values.py \ | |
| dex/async_worker.py \ | |
| dex/blob_cache.py \ | |
| dex/channel.py \ | |
| dex/client.py \ | |
| dex/client_options.py \ | |
| dex/codec.py \ | |
| dex/condition.py \ | |
| dex/credential.py \ | |
| dex/context.py \ | |
| dex/flow.py \ | |
| dex/flow_config.py \ | |
| dex/flow_info.py \ | |
| dex/flow_options.py \ | |
| dex/join.py \ | |
| dex/runtime_errors.py \ | |
| dex/step.py \ | |
| dex/step_execution.py \ | |
| dex/stream.py \ | |
| dex/timer.py \ | |
| dex/wait.py \ | |
| dex/worker.py \ | |
| dex/worker_options.py \ | |
| tests/*.py \ | |
| tests/integ/*.py \ | |
| pyproject.toml \ | |
| uv.lock | |
| integration: | |
| name: Integration tests (zd, pull) | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 75 | |
| permissions: | |
| contents: read | |
| id-token: write | |
| defaults: | |
| run: | |
| working-directory: sdk-python | |
| env: | |
| DEX_INTEG_ENGINE: zd | |
| DEX_SERVER_ZD_BINARY: ${{ github.workspace }}/server-zd/target/debug/dex-server-zd | |
| CARGO_TERM_COLOR: always | |
| CARGO_INCREMENTAL: "0" | |
| RUST_BACKTRACE: "1" | |
| RUSTUP_TOOLCHAIN: "1.97.1" | |
| CARGO_BUILD_JOBS: "4" | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Install Rust | |
| run: rustup toolchain install 1.97.1 --profile minimal | |
| - name: Install libclang for RocksDB | |
| run: sudo apt-get update && sudo apt-get install -y libclang-dev | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| workspaces: server-zd | |
| shared-key: server-zd-paradedb | |
| save-if: false | |
| - name: Build dex-server-zd | |
| working-directory: server-zd | |
| run: cargo build --locked -p dexzd-server --bin dex-server-zd | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: 22 | |
| cache: npm | |
| cache-dependency-path: web/package-lock.json | |
| - uses: actions/setup-go@v7 | |
| with: | |
| go-version-file: cli/go.mod | |
| cache-dependency-path: | | |
| cli/go.sum | |
| web/go.sum | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0 | |
| with: | |
| version: "0.12.2" | |
| python-version: "3.11" | |
| working-directory: sdk-python | |
| enable-cache: true | |
| - name: Install dependencies | |
| run: uv sync --locked --reinstall-package dex-python-sdk | |
| - name: Run Python and dexcli dev integration coverage | |
| run: ./run-integration-tests.sh --coverage | |
| - name: Upload Python integration coverage to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| disable_search: true | |
| fail_ci_if_error: true | |
| files: ./sdk-python/coverage/lcov.info | |
| flags: sdk-python-integration | |
| name: sdk-python-integration-zd | |
| use_oidc: true | |
| - name: Upload coverage report | |
| if: always() | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: sdk-python-integration-coverage-zd | |
| path: sdk-python/coverage/ | |
| if-no-files-found: ignore | |
| - name: Upload service logs | |
| if: always() | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: sdk-python-integration-services-zd | |
| path: /tmp/test-python-sdk-integration-services.log | |
| if-no-files-found: ignore |