Skip to content

Commit 0acbc59

Browse files
committed
Add downstream test for jiter
1 parent 97753d8 commit 0acbc59

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

.github/workflows/downstream-tests.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ jobs:
1414
- virtualenv
1515
- pyo3
1616
- pydantic-core
17+
- jiter
1718
os:
1819
- id: ubuntu-latest
1920
platform: linux
@@ -36,7 +37,7 @@ jobs:
3637
run: brew install cmake
3738

3839
- name: Install Rust toolchain
39-
if: ${{ matrix.name == 'pyo3' || matrix.name == 'pydantic-core' }}
40+
if: ${{ matrix.name == 'pyo3' || matrix.name == 'pydantic-core' || matrix.name == 'jiter' }}
4041
run: |
4142
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
4243
echo "${HOME}/.cargo/bin" >> $GITHUB_PATH

mx.graalpython/downstream_tests.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,19 @@ def downstream_test_pydantic_core(graalpy, testdir):
158158
run(['uv', 'run', 'pytest', '-v', '--tb=short'], cwd=src)
159159

160160

161+
@downstream_test('jiter')
162+
def downstream_test_jiter(graalpy, testdir):
163+
run(['git', 'clone', 'https://github.com/pydantic/jiter.git', '-b', 'main'], cwd=testdir)
164+
src = testdir / 'jiter'
165+
venv = src / 'venv'
166+
run([graalpy, '-m', 'venv', str(venv)])
167+
run_in_venv(venv, ['pip', 'install', '-r', 'crates/jiter-python/tests/requirements.txt'], cwd=src)
168+
run_in_venv(venv, ['pip', 'install', '-e', 'crates/jiter-python',
169+
'--config-settings=build-args=--profile dev'], cwd=src)
170+
run_in_venv(venv, ['pytest', '-v', '--tb=short', 'crates/jiter-python/tests'], cwd=src)
171+
run_in_venv(venv, ['python', 'crates/jiter-python/bench.py', 'jiter', 'jiter-cache', '--fast'], cwd=src)
172+
173+
161174
def run_downstream_test(python, project):
162175
testdir = Path('upstream-tests').absolute()
163176
shutil.rmtree(testdir, ignore_errors=True)

0 commit comments

Comments
 (0)