feat: modernize project tooling and add comprehensive type annotations #1144
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: ci-pydgraph-tests | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| types: | |
| - opened | |
| - reopened | |
| - synchronize | |
| - ready_for_review | |
| branches: | |
| - main | |
| schedule: | |
| - cron: 1 0 * * * # run workflow daily | |
| permissions: | |
| contents: read | |
| jobs: | |
| test-pydgraph-dgraph-latest: | |
| name: Test (Python ${{ matrix.python-version }} / DGraph Latest) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] | |
| steps: | |
| - name: Checkout pydgraph | |
| uses: actions/checkout@v5 | |
| with: | |
| repository: dgraph-io/pydgraph | |
| ref: ${{ github.ref }} | |
| - name: Setup python runtime and tooling | |
| uses: ./.github/actions/setup-python-and-tooling | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Pin python version | |
| run: uv python pin ${{ matrix.python-version }} | |
| - name: Setup project dependencies | |
| run: INSTALL_MISSING_TOOLS=true make setup | |
| - name: Sync python virtualenv | |
| run: make sync | |
| - name: Run tests | |
| run: make test | |
| test-pydgraph-dgraph-head: | |
| name: Test Pydgraph (Python ${{ matrix.python-version }} / DGraph HEAD) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] | |
| steps: | |
| - name: Checkout Dgraph main latest | |
| uses: actions/checkout@v5 | |
| with: | |
| path: dgraph | |
| repository: dgraph-io/dgraph | |
| ref: main | |
| - name: Setup Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: dgraph/go.mod | |
| - name: Build dgraph binary | |
| working-directory: ./dgraph | |
| run: make docker-image # also builds dgraph binary | |
| - name: Install dgraph binary | |
| working-directory: ./dgraph | |
| run: mv dgraph/dgraph ~/go/bin/dgraph | |
| - name: Checkout pydgraph | |
| uses: actions/checkout@v5 | |
| with: | |
| path: pydgraph | |
| repository: dgraph-io/pydgraph | |
| ref: ${{ github.ref }} | |
| - name: Setup python runtime and tooling | |
| uses: ./pydgraph/.github/actions/setup-python-and-tooling | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Pin python version | |
| working-directory: ./pydgraph | |
| run: uv python pin ${{ matrix.python-version }} | |
| - name: Setup project dependencies | |
| working-directory: ./pydgraph | |
| run: INSTALL_MISSING_TOOLS=true make setup | |
| - name: Sync python virtualenv | |
| working-directory: ./pydgraph | |
| run: make sync | |
| - name: Run tests | |
| working-directory: ./pydgraph | |
| run: DGRAPH_IMAGE_TAG=local make test |