Repository navigation
management: add bounded native runtime #627
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: NumPy import contract | |
| on: | |
| pull_request: | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
| jobs: | |
| changes: | |
| if: github.event_name == 'pull_request' | |
| uses: ./.github/workflows/select-tests.yml | |
| numpy-import-contract: | |
| name: NumPy import contract | |
| needs: changes | |
| if: >- | |
| !cancelled() && | |
| (needs.changes.result != 'success' || needs.changes.outputs.numpy != 'false') | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 20 | |
| permissions: | |
| contents: read | |
| env: | |
| CASS_DRIVER_BUILD_EXTENSIONS_ARE_MUST: "yes" | |
| CASS_DRIVER_NO_SKIP: "1" | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1 | |
| with: | |
| python-version: "3.13" | |
| enable-cache: true | |
| - name: Check production imports | |
| run: python3 scripts/check_numpy_imports.py | |
| - name: Install libev | |
| run: sudo apt-get install libev4 libev-dev | |
| - name: Build driver and install test dependencies | |
| run: uv sync | |
| - name: Verify NumPy is available | |
| run: uv run python -c "import numpy" | |
| - name: Test lazy imports and explicit access | |
| run: uv run pytest -rf tests/unit/test_protocol_imports.py tests/unit/test_numpy_import_contract.py |