ci: isolate client smoke and hub tests
CI / Capabilities and shell quality (push) Successful in 11s
CI / Python tests and compilation (push) Successful in 12s
CI / PowerShell tests on Ubuntu (push) Failing after 14s
CI / CI configuration security checks (push) Successful in 3s
CI / Build and inspect generated packages (push) Successful in 7s
CI / Qwen retrieval integration (push) Failing after 9m38s
CI / Bash integration and installation guards (push) Successful in 16s
CI / Installed client configuration smoke tests (push) Successful in 12s

This commit is contained in:
fraujulian committed 2026-09-18 12:57:28 +02:00
1 parent acb53382a6
commit 13b0cb66d6
3 files changed
+24

No files matched your search

+20
View File
@@ -4,6 +4,7 @@ from concurrent.futures import ThreadPoolExecutor
import os
from pathlib import Path
import re
import socket
from tempfile import TemporaryDirectory
from types import SimpleNamespace
import time
@@ -26,12 +27,29 @@ def embedding():
return array('f', [1.0] + [0.0] * (MODULE.EMBEDDING_DIMENSIONS - 1))
def huggingface_available():
try:
socket.getaddrinfo('huggingface.co', 443)
except socket.gaierror:
return False
return True
class RetrievalServerTests(unittest.TestCase):
def test_huggingface_availability_handles_dns_failure(self):
with patch('socket.getaddrinfo', side_effect=socket.gaierror):
self.assertFalse(huggingface_available())
def test_ci_disables_xet_for_model_downloads(self):
for workflow in ('.github/workflows/ci.yml', '.gitea/workflows/ci.yml'):
content = (ROOT / workflow).read_text(encoding='utf-8')
self.assertIn("HF_HUB_DISABLE_XET: '1'", content)
def test_client_smoke_builds_packages(self):
for workflow in ('.github/workflows/ci.yml', '.gitea/workflows/ci.yml'):
content = (ROOT / workflow).read_text(encoding='utf-8')
self.assertIn('name: Build packages\n run: bash scripts/commands/build.sh --summary', content)
def test_runtime_python_uses_adjacent_virtualenv(self):
with TemporaryDirectory() as temporary:
script = Path(temporary) / 'semantic-retrieval' / 'server.py'
@@ -49,6 +67,8 @@ class RetrievalServerTests(unittest.TestCase):
@unittest.skipUnless(os.environ.get('QWEN_TEST_MODEL_CACHE'), 'Set QWEN_TEST_MODEL_CACHE to run the real-model check.')
def test_real_models(self):
if not huggingface_available():
self.skipTest('huggingface.co DNS is unavailable')
os.environ['HF_HOME'] = os.environ['QWEN_TEST_MODEL_CACHE']
with TemporaryDirectory() as temporary:
root = Path(temporary)