Skip to content

Commit c380b70

Browse files
committed
ci: add protobuf compat tests for both DGraph Latest and HEAD
Split protobuf compatibility testing into two jobs: - test-pydgraph-protobuf-compat-dgraph-latest: Tests against released DGraph - test-pydgraph-protobuf-compat-dgraph-head: Tests against DGraph HEAD This mirrors the structure of the main test matrix.
1 parent b693815 commit c380b70

File tree

1 file changed

+57
-2
lines changed

1 file changed

+57
-2
lines changed

.github/workflows/ci-pydgraph-tests.yml

Lines changed: 57 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,10 @@ jobs:
8585
- name: Run tests
8686
working-directory: ./pydgraph
8787
run: DGRAPH_IMAGE_TAG=local make test
88-
test-pydgraph-protobuf-compat:
89-
name: Test Pydgraph (Python ${{ matrix.python-version }} / ${{ matrix.protobuf-version }})
88+
test-pydgraph-protobuf-compat-dgraph-latest:
89+
name:
90+
Test Pydgraph (Python ${{ matrix.python-version }} / ${{ matrix.protobuf-version }} / DGraph
91+
Latest)
9092
runs-on: ubuntu-latest
9193
strategy:
9294
matrix:
@@ -114,3 +116,56 @@ jobs:
114116
run: uv pip install "${{ matrix.protobuf-version }}"
115117
- name: Run tests
116118
run: make test
119+
test-pydgraph-protobuf-compat-dgraph-head:
120+
name:
121+
Test Pydgraph (Python ${{ matrix.python-version }} / ${{ matrix.protobuf-version }} / DGraph
122+
HEAD)
123+
runs-on: ubuntu-latest
124+
strategy:
125+
matrix:
126+
python-version: ["3.9", "3.14"]
127+
protobuf-version:
128+
- protobuf>=4.23.0,<5.0.0
129+
- protobuf>=5.0.0,<6.0.0
130+
steps:
131+
- name: Checkout Dgraph main latest
132+
uses: actions/checkout@v5
133+
with:
134+
path: dgraph
135+
repository: dgraph-io/dgraph
136+
ref: main
137+
- name: Setup Go
138+
uses: actions/setup-go@v6
139+
with:
140+
go-version-file: dgraph/go.mod
141+
- name: Build dgraph binary
142+
working-directory: ./dgraph
143+
run: make docker-image
144+
- name: Install dgraph binary
145+
working-directory: ./dgraph
146+
run: mv dgraph/dgraph ~/go/bin/dgraph
147+
- name: Checkout pydgraph
148+
uses: actions/checkout@v5
149+
with:
150+
path: pydgraph
151+
repository: dgraph-io/pydgraph
152+
ref: ${{ github.ref }}
153+
- name: Setup python runtime and tooling
154+
uses: ./pydgraph/.github/actions/setup-python-and-tooling
155+
with:
156+
python-version: ${{ matrix.python-version }}
157+
- name: Pin python version
158+
working-directory: ./pydgraph
159+
run: uv python pin ${{ matrix.python-version }}
160+
- name: Setup project dependencies
161+
working-directory: ./pydgraph
162+
run: INSTALL_MISSING_TOOLS=true make setup
163+
- name: Sync python virtualenv
164+
working-directory: ./pydgraph
165+
run: make sync
166+
- name: Install specific protobuf version
167+
working-directory: ./pydgraph
168+
run: uv pip install "${{ matrix.protobuf-version }}"
169+
- name: Run tests
170+
working-directory: ./pydgraph
171+
run: DGRAPH_IMAGE_TAG=local make test

0 commit comments

Comments
 (0)