feat: add bounded graph extraction concurrency #1842
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: HG-Python-Client CI | |
| on: | |
| push: | |
| branches: | |
| - 'main' | |
| - 'release-*' | |
| pull_request: | |
| permissions: | |
| contents: read | |
| env: | |
| UV_VERSION: "0.9.22" | |
| jobs: | |
| client-unit-contract: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.10", "3.11"] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install uv | |
| run: | | |
| curl -LsSf "https://astral.sh/uv/${UV_VERSION}/install.sh" | sh | |
| echo "$HOME/.local/bin" >> "$GITHUB_PATH" | |
| "$HOME/.local/bin/uv" --version | |
| - name: Cache dependencies | |
| id: cache-deps | |
| uses: actions/cache@v5 | |
| with: | |
| path: | | |
| ~/.cache/uv | |
| key: ${{ runner.os }}-uv-${{ matrix.python-version }}-${{ hashFiles('**/pyproject.toml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-uv-${{ matrix.python-version }}- | |
| - name: Install dependencies with uv sync | |
| run: | | |
| uv sync --extra python-client --extra dev | |
| - name: Run unit and contract tests | |
| run: | | |
| uv run pytest hugegraph-python-client/src/tests -m "unit or contract" --cov=pyhugegraph --cov-fail-under=45 --cov-report=term --cov-report=xml:client-unit-contract.xml -v --tb=short --durations=20 | |
| - name: Upload coverage artifact | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: client-unit-contract-coverage-${{ matrix.python-version }} | |
| path: client-unit-contract.xml | |
| if-no-files-found: error | |
| client-hugegraph-integration: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.10", "3.11"] | |
| services: | |
| hugegraph: | |
| image: hugegraph/hugegraph:1.7.0 | |
| env: | |
| PASSWORD: admin | |
| options: --health-cmd="curl -f http://localhost:8080/versions || exit 1" --health-interval=10s --health-timeout=5s --health-retries=8 | |
| ports: | |
| - 8080:8080 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install uv | |
| run: | | |
| curl -LsSf "https://astral.sh/uv/${UV_VERSION}/install.sh" | sh | |
| echo "$HOME/.local/bin" >> "$GITHUB_PATH" | |
| "$HOME/.local/bin/uv" --version | |
| - name: Cache dependencies | |
| id: cache-deps | |
| uses: actions/cache@v5 | |
| with: | |
| path: | | |
| ~/.cache/uv | |
| key: ${{ runner.os }}-uv-${{ matrix.python-version }}-${{ hashFiles('**/pyproject.toml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-uv-${{ matrix.python-version }}- | |
| - name: Install dependencies with uv sync | |
| run: | | |
| uv sync --extra python-client --extra dev | |
| - name: Run HugeGraph integration tests | |
| env: | |
| HUGEGRAPH_REQUIRED: true | |
| HUGEGRAPH_URL: http://127.0.0.1:8080 | |
| HUGEGRAPH_GRAPH: hugegraph | |
| HUGEGRAPH_USER: admin | |
| HUGEGRAPH_PASSWORD: admin | |
| run: | | |
| uv run pytest hugegraph-python-client/src/tests -m "integration and hugegraph" -v --tb=short | |
| - name: Dump HugeGraph diagnostics | |
| if: failure() | |
| run: | | |
| docker ps -a | |
| container_id=$(docker ps -aq --filter ancestor=hugegraph/hugegraph:1.7.0 | head -n 1) | |
| if [ -n "$container_id" ]; then | |
| docker logs "$container_id" | |
| fi |