fix: resolve CI failures across all workflows
All checks were successful
API Endpoint Tests / test-api-endpoints (push) Successful in 39s
Integration Tests / test-service-integration (push) Successful in 44s
Package Tests / test-python-packages (map[name:aitbc-core path:packages/py/aitbc-core]) (push) Successful in 16s
Package Tests / test-python-packages (map[name:aitbc-agent-sdk path:packages/py/aitbc-agent-sdk]) (push) Successful in 30s
Package Tests / test-python-packages (map[name:aitbc-crypto path:packages/py/aitbc-crypto]) (push) Successful in 20s
Package Tests / test-python-packages (map[name:aitbc-sdk path:packages/py/aitbc-sdk]) (push) Successful in 20s
Package Tests / test-javascript-packages (map[name:aitbc-sdk-js path:packages/js/aitbc-sdk]) (push) Successful in 17s
Package Tests / test-javascript-packages (map[name:aitbc-token path:packages/solidity/aitbc-token]) (push) Successful in 1m17s
Python Tests / test-python (push) Successful in 1m7s
Smart Contract Tests / test-solidity (map[name:aitbc-token path:packages/solidity/aitbc-token]) (push) Successful in 30s
Security Scanning / security-scan (push) Successful in 1m5s
Smart Contract Tests / test-solidity (map[name:zk-circuits path:apps/zk-circuits]) (push) Successful in 49s
Smart Contract Tests / lint-solidity (push) Successful in 54s
All checks were successful
API Endpoint Tests / test-api-endpoints (push) Successful in 39s
Integration Tests / test-service-integration (push) Successful in 44s
Package Tests / test-python-packages (map[name:aitbc-core path:packages/py/aitbc-core]) (push) Successful in 16s
Package Tests / test-python-packages (map[name:aitbc-agent-sdk path:packages/py/aitbc-agent-sdk]) (push) Successful in 30s
Package Tests / test-python-packages (map[name:aitbc-crypto path:packages/py/aitbc-crypto]) (push) Successful in 20s
Package Tests / test-python-packages (map[name:aitbc-sdk path:packages/py/aitbc-sdk]) (push) Successful in 20s
Package Tests / test-javascript-packages (map[name:aitbc-sdk-js path:packages/js/aitbc-sdk]) (push) Successful in 17s
Package Tests / test-javascript-packages (map[name:aitbc-token path:packages/solidity/aitbc-token]) (push) Successful in 1m17s
Python Tests / test-python (push) Successful in 1m7s
Smart Contract Tests / test-solidity (map[name:aitbc-token path:packages/solidity/aitbc-token]) (push) Successful in 30s
Security Scanning / security-scan (push) Successful in 1m5s
Smart Contract Tests / test-solidity (map[name:zk-circuits path:apps/zk-circuits]) (push) Successful in 49s
Smart Contract Tests / lint-solidity (push) Successful in 54s
aitbc-agent-sdk (package-tests.yml): - Add AITBCAgent convenience class matching test expectations - Fix test_agent_sdk.py: was importing nonexistent AITBCAgent, now tests the real API (Agent.create, AgentCapabilities, to_dict) plus AITBCAgent - Fix 3 remaining mypy errors: supported_models Optional coercion (line 64), missing return types on _submit_to_marketplace/_update_marketplace_offer - Run black on all 5 src files — zero mypy errors, zero black warnings - All 6 tests pass python-tests.yml: - Add pynacl to pip install (aitbc-crypto and aitbc-sdk import nacl) - Add pynacl>=1.5.0 to root requirements.txt Service readiness (api-endpoint-tests.yml, integration-tests.yml): - Replace curl -sf with curl http_code check — -sf fails on 404 responses but port 8006 (blockchain RPC) returns 404 on / while being healthy - Blockchain RPC uses REST /rpc/* endpoints, not JSON-RPC POST to / Fix test_api_endpoints.py to test /health, /rpc/head, /rpc/info, /rpc/supply - Remove dead test_rpc() function, add blockchain RPC to perf tests - All 4 services now pass: coordinator, exchange, wallet, blockchain_rpc - Integration-tests: check is-active before systemctl start to avoid spurious warnings for already-running services Hardhat compile (smart-contract-tests.yml, package-tests.yml): - Relax engines field from >=24.14.0 to >=18.0.0 (CI has v24.13.0) - Remove 2>/dev/null from hardhat compile/test so errors are visible - Remove 2>/dev/null from npm run build/test in package-tests JS section
This commit is contained in:
@@ -12,16 +12,9 @@ SERVICES = {
|
||||
"coordinator": {"url": "http://localhost:8000", "endpoints": ["/", "/health", "/info"]},
|
||||
"exchange": {"url": "http://localhost:8001", "endpoints": ["/", "/api/health", "/health", "/info"]},
|
||||
"wallet": {"url": "http://localhost:8003", "endpoints": ["/", "/health", "/wallets"]},
|
||||
"blockchain_rpc": {"url": "http://localhost:8006", "endpoints": []},
|
||||
"blockchain_rpc": {"url": "http://localhost:8006", "endpoints": ["/health", "/rpc/head", "/rpc/info", "/rpc/supply"]},
|
||||
}
|
||||
|
||||
RPC_METHODS = [
|
||||
{"method": "eth_blockNumber", "params": []},
|
||||
{"method": "eth_getBalance", "params": ["0x0000000000000000000000000000000000000000", "latest"]},
|
||||
{"method": "eth_chainId", "params": []},
|
||||
{"method": "eth_gasPrice", "params": []},
|
||||
]
|
||||
|
||||
|
||||
def test_service_endpoints(name, base_url, endpoints, timeout=5):
|
||||
results = {"service": name, "endpoints": [], "success": True}
|
||||
@@ -41,25 +34,6 @@ def test_service_endpoints(name, base_url, endpoints, timeout=5):
|
||||
return results
|
||||
|
||||
|
||||
def test_rpc(base_url, timeout=5):
|
||||
results = {"service": "blockchain_rpc", "methods": [], "success": True}
|
||||
for m in RPC_METHODS:
|
||||
payload = {"jsonrpc": "2.0", "method": m["method"], "params": m["params"], "id": 1}
|
||||
try:
|
||||
r = requests.post(base_url, json=payload, timeout=timeout)
|
||||
ok = r.status_code == 200
|
||||
result_val = r.json().get("result", "N/A") if ok else None
|
||||
results["methods"].append({"method": m["method"], "status": r.status_code, "result": str(result_val), "success": ok})
|
||||
print(f" {'✅' if ok else '❌'} {m['method']}: {result_val}")
|
||||
if not ok:
|
||||
results["success"] = False
|
||||
except Exception as e:
|
||||
results["methods"].append({"method": m["method"], "error": str(e), "success": False})
|
||||
print(f" ❌ {m['method']}: {e}")
|
||||
results["success"] = False
|
||||
return results
|
||||
|
||||
|
||||
def test_performance(apis, rounds=10, timeout=5):
|
||||
results = {}
|
||||
for name, url in apis:
|
||||
@@ -95,10 +69,7 @@ def main():
|
||||
|
||||
for name, cfg in SERVICES.items():
|
||||
print(f"\n🧪 Testing {name}...")
|
||||
if name == "blockchain_rpc":
|
||||
r = test_rpc(cfg["url"])
|
||||
else:
|
||||
r = test_service_endpoints(name, cfg["url"], cfg["endpoints"])
|
||||
r = test_service_endpoints(name, cfg["url"], cfg["endpoints"])
|
||||
all_results[name] = r
|
||||
if not r["success"]:
|
||||
overall_ok = False
|
||||
@@ -108,6 +79,7 @@ def main():
|
||||
("Coordinator", "http://localhost:8000/health"),
|
||||
("Exchange", "http://localhost:8001/api/health"),
|
||||
("Wallet", "http://localhost:8003/health"),
|
||||
("Blockchain RPC", "http://localhost:8006/health"),
|
||||
])
|
||||
all_results["performance"] = perf
|
||||
|
||||
|
||||
Reference in New Issue
Block a user