File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -157,6 +157,9 @@ jobs:
157157 env :
158158 CI : true
159159 COVERAGE_PROCESS_START : ./pyproject.toml
160+ # We only run the llama_cpp tests on the latest Python as they have been regularly failing in CI with `Fatal Python error: Illegal instruction`:
161+ # https://github.com/pydantic/pydantic-ai/actions/runs/19547773220/job/55970947389
162+ RUN_LLAMA_CPP_TESTS : ${{ matrix.python-version == '3.13' && matrix.install.name == 'all-extras' }}
160163 steps :
161164 - uses : actions/checkout@v4
162165
@@ -207,6 +210,7 @@ jobs:
207210 env :
208211 CI : true
209212 COVERAGE_PROCESS_START : ./pyproject.toml
213+ RUN_LLAMA_CPP_TESTS : false
210214 steps :
211215 - uses : actions/checkout@v4
212216
Original file line number Diff line number Diff line change 66from __future__ import annotations as _annotations
77
88import json
9+ import os
910from collections .abc import Callable
1011from pathlib import Path
1112from typing import Any
8081 not transformer_imports_successful (), reason = 'transformers not available'
8182)
8283
84+ # We only run this on the latest Python as the llama_cpp tests have been regularly failing in CI with `Fatal Python error: Illegal instruction`:
85+ # https://github.com/pydantic/pydantic-ai/actions/runs/19547773220/job/55970947389
8386skip_if_llama_cpp_imports_unsuccessful = pytest .mark .skipif (
84- not llama_cpp_imports_successful (), reason = 'llama_cpp not available'
87+ not llama_cpp_imports_successful () or os .getenv ('RUN_LLAMA_CPP_TESTS' , 'true' ).lower () == 'false' ,
88+ reason = 'llama_cpp not available' ,
8589)
8690
8791skip_if_vllm_imports_unsuccessful = pytest .mark .skipif (not vllm_imports_successful (), reason = 'vllm not available' )
You can’t perform that action at this time.
0 commit comments