Files
hermes-agent/scripts/smoke_test.py
Bezalel cca5d64bb9
Some checks failed
Forge CI / smoke-and-build (pull_request) Failing after 2s
[BEZALEL][Epic-001] The Forge CI Pipeline — Gitea Actions + Smoke + Green E2E
- Add .gitea/workflows/ci.yml: Gitea Actions workflow for PR/push CI
- Add scripts/smoke_test.py: fast smoke tests (<30s) for core imports and CLI entrypoints
- Add tests/test_green_path_e2e.py: bare green-path e2e — terminal echo test
- Total CI runtime target: <5 minutes
- No API keys required for smoke/e2e stages

Closes #145
/assign @bezalel
2026-04-07 00:25:45 +00:00

55 lines
1.2 KiB
Python
Executable File

#!/usr/bin/env python3
"""Forge smoke tests — fast checks that core imports resolve and entrypoints load.
Total runtime target: < 30 seconds.
"""
from __future__ import annotations
import importlib
import subprocess
import sys
CORE_MODULES = [
"hermes_cli.config",
"hermes_state",
"model_tools",
"toolsets",
"utils",
]
CLI_ENTRYPOINTS = [
["python", "cli.py", "--help"],
]
def test_imports() -> None:
for mod in CORE_MODULES:
try:
importlib.import_module(mod)
except Exception as exc:
print(f"FAIL: import {mod} -> {exc}")
sys.exit(1)
print(f"OK: {len(CORE_MODULES)} core imports")
def test_cli_help() -> None:
for cmd in CLI_ENTRYPOINTS:
result = subprocess.run(cmd, capture_output=True, timeout=30)
if result.returncode != 0:
stderr = result.stderr.decode()[:200]
print(f"FAIL: {' '.join(cmd)} -> {stderr}")
sys.exit(1)
print(f"OK: {len(CLI_ENTRYPOINTS)} CLI entrypoints")
def main() -> int:
test_imports()
test_cli_help()
print("Smoke tests passed.")
return 0
if __name__ == "__main__":
raise SystemExit(main())