Skip to content

Commit 79b895a

Browse files
msimacekhicham-amazigh
authored andcommitted
Add downstream test for jiter
(cherry picked from commit 0acbc59)
1 parent fac92b5 commit 79b895a

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

.github/workflows/downstream-tests.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ jobs:
1313
- pybind11
1414
- virtualenv
1515
- pyo3
16+
- jiter
1617
os:
1718
- id: ubuntu-latest
1819
platform: linux
@@ -35,7 +36,7 @@ jobs:
3536
run: brew install cmake
3637

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

mx.graalpython/downstream_tests.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,17 @@ def downstream_test_pyo3(graalpy):
153153
run_in_venv(venv, ['pip', 'install', 'nox'])
154154
run_in_venv(venv, ['nox', '-s', 'test-py'], cwd=src)
155155

156+
@downstream_test('jiter')
157+
def downstream_test_jiter(graalpy, testdir):
158+
run(['git', 'clone', 'https://github.com/pydantic/jiter.git', '-b', 'main'], cwd=testdir)
159+
src = testdir / 'jiter'
160+
venv = src / 'venv'
161+
run([graalpy, '-m', 'venv', str(venv)])
162+
run_in_venv(venv, ['pip', 'install', '-r', 'crates/jiter-python/tests/requirements.txt'], cwd=src)
163+
run_in_venv(venv, ['pip', 'install', '-e', 'crates/jiter-python',
164+
'--config-settings=build-args=--profile dev'], cwd=src)
165+
run_in_venv(venv, ['pytest', '-v', '--tb=short', 'crates/jiter-python/tests'], cwd=src)
166+
run_in_venv(venv, ['python', 'crates/jiter-python/bench.py', 'jiter', 'jiter-cache', '--fast'], cwd=src)
156167

157168
def run_downstream_test(python, project):
158169
DOWNSTREAM_TESTS[project](python)

0 commit comments

Comments
 (0)