mirror of
https://github.com/nesquena/hermes-webui.git
synced 2026-05-29 13:10:17 +00:00
test: tighten CI and console hygiene
This commit is contained in:
@@ -24,7 +24,7 @@ jobs:
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install pyyaml>=6.0 pytest pytest-timeout pytest-asyncio
|
||||
pip install "pyyaml>=6.0" pytest pytest-timeout pytest-asyncio
|
||||
# Install the `mcp` package so tests/test_mcp_server.py runs in CI.
|
||||
# The package is an optional runtime dep of mcp_server.py — users
|
||||
# who run the MCP integration install it themselves; CI installs
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
[pytest]
|
||||
markers =
|
||||
integration: tests that hit the live test server or external integration surface
|
||||
+1
-1
@@ -906,7 +906,7 @@ async function _fetchLiveModels(provider, sel){
|
||||
const added=_addLiveModelsToSelect(provider,data.models,sel);
|
||||
if(added>0){
|
||||
if(typeof syncModelChip==='function') syncModelChip();
|
||||
console.log('[hermes] Live models loaded for',provider+':',added,'new models added');
|
||||
console.debug('[hermes] Live models loaded for',provider+':',added,'new models added');
|
||||
}
|
||||
}catch(e){
|
||||
console.debug('[hermes] Live model fetch failed for',provider,e.message);
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
"""Small hygiene regression checks for CI and frontend console noise."""
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
|
||||
|
||||
def test_github_actions_quotes_pyyaml_version_specifier():
|
||||
"""Unquoted `pyyaml>=6.0` is parsed by the shell as stdout redirection."""
|
||||
workflow = ROOT / ".github" / "workflows" / "tests.yml"
|
||||
text = workflow.read_text(encoding="utf-8")
|
||||
|
||||
assert '"pyyaml>=6.0"' in text or "'pyyaml>=6.0'" in text
|
||||
assert "pip install pyyaml>=6.0" not in text
|
||||
|
||||
|
||||
def test_pytest_integration_marker_is_registered():
|
||||
config = ROOT / "pytest.ini"
|
||||
text = config.read_text(encoding="utf-8")
|
||||
|
||||
assert "markers" in text
|
||||
assert "integration:" in text
|
||||
|
||||
|
||||
def test_live_model_success_log_is_debug_not_default_console_log():
|
||||
ui = (ROOT / "static" / "ui.js").read_text(encoding="utf-8")
|
||||
|
||||
assert "console.debug('[hermes] Live models loaded" in ui
|
||||
assert "console.log('[hermes] Live models loaded" not in ui
|
||||
Reference in New Issue
Block a user