ci-pydgraph-tests #774
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: warp-ubuntu-latest-x64-4x | |
| strategy: | |
| matrix: | |
| python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] | |
| steps: | |
| - name: Checkout pydgraph repo | |
| uses: actions/checkout@v4 | |
| with: | |
| path: pydgraph | |
| repository: hypermodeinc/pydgraph | |
| ref: ${{ github.ref }} | |
| - name: Checkout Dgraph repo # needed for acl tests | |
| uses: actions/checkout@v4 | |
| with: | |
| path: dgraph | |
| repository: hypermodeinc/dgraph | |
| ref: main | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| 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: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| 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 | |
| run: | | |
| cd pydgraph | |
| python scripts/protogen.py | |
| git diff --exit-code -- . | |
| - name: Run tests | |
| run: cd pydgraph && DGRAPH_IMAGE_TAG=local bash scripts/local-test.sh |