ci-pydgraph-tests #1148
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: | |
| pydgraph-tests: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] | |
| steps: | |
| - name: Checkout pydgraph repo | |
| uses: actions/checkout@v5 | |
| with: | |
| path: pydgraph | |
| repository: dgraph-io/pydgraph | |
| ref: ${{ github.ref }} | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: | | |
| cd pydgraph | |
| python -m pip install --upgrade pip | |
| python -m pip install .[dev] | |
| - name: Verify that updated protobufs are checked in | |
| if: ${{ matrix.python-version == '3.9' || matrix.python-version == '3.10' || | |
| matrix.python-version == '3.11' || matrix.python-version == '3.12' }} # Skip for Python 3.13+ due to grpcio-tools compatibility | |
| run: | | |
| cd pydgraph | |
| python scripts/protogen.py | |
| git diff --exit-code -- . | |
| - name: Checkout Dgraph repo # needed for acl tests | |
| uses: actions/checkout@v5 | |
| with: | |
| path: dgraph | |
| repository: dgraph-io/dgraph | |
| ref: main | |
| - name: Set up Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: dgraph/go.mod | |
| - name: Build dgraph binary | |
| run: cd dgraph && make docker-image # also builds dgraph binary | |
| - name: Move dgraph binary to gopath | |
| run: cd dgraph && mv dgraph/dgraph ~/go/bin/dgraph | |
| - name: Run tests | |
| run: cd pydgraph && DGRAPH_IMAGE_TAG=local bash scripts/local-test.sh |