ci: update production deps and dynamic systemd service handling
Some checks failed
Production Tests / Production Integration Tests (push) Failing after 55s
Systemd Sync / sync-systemd (push) Successful in 20s

This commit is contained in:
aitbc
2026-04-27 09:33:59 +02:00
parent e9a1b33a8a
commit 8926bb011e
2 changed files with 32 additions and 9 deletions

View File

@@ -46,7 +46,7 @@ jobs:
--repo-dir "$PWD" \
--venv-dir "$PWD/venv" \
--skip-requirements \
--extra-packages "pytest pytest-asyncio pytest-timeout requests pyjwt fastapi uvicorn[standard] redis bcrypt websockets numpy psutil prometheus-client celery aiohttp pydantic python-dotenv"
--extra-packages "pytest pytest-asyncio pytest-timeout requests pyjwt fastapi uvicorn[standard] redis bcrypt websockets numpy psutil prometheus-client celery aiohttp pydantic pydantic-settings python-dotenv"
# Ensure standard directories exist
mkdir -p /var/lib/aitbc/data /var/lib/aitbc/keystore /etc/aitbc /var/log/aitbc

View File

@@ -90,21 +90,31 @@ jobs:
systemctl daemon-reload
echo "✅ Systemd daemon reloaded"
mapfile -t services < <(
find systemd -maxdepth 1 -type f -name "aitbc-*.service" -printf "%f\n" |
sed 's/\.service$//' |
sort
)
if [[ ${#services[@]} -eq 0 ]]; then
echo "⚠️ No aitbc service files found to enable/start"
fi
# Enable services
echo "=== Enabling services ==="
for svc in aitbc-coordinator-api aitbc-exchange-api aitbc-wallet aitbc-blockchain-node aitbc-blockchain-rpc aitbc-adaptive-learning; do
if systemctl list-unit-files | grep -q "$svc.service"; then
for svc in "${services[@]}"; do
if systemctl list-unit-files | grep -q "^$svc.service"; then
systemctl enable "$svc" 2>/dev/null || echo " ⚠️ $svc enable failed"
echo " ✅ $svc enabled"
echo " ✅ $svc enable attempted"
else
echo " ⚠️ $svc service file not found"
fi
done
# Start core services that should be running
echo "=== Starting core services ==="
for svc in aitbc-blockchain-node aitbc-blockchain-rpc aitbc-exchange-api; do
if systemctl list-unit-files | grep -q "$svc.service"; then
# Start services
echo "=== Starting services ==="
for svc in "${services[@]}"; do
if systemctl list-unit-files | grep -q "^$svc.service"; then
systemctl start "$svc" 2>/dev/null || echo " ⚠️ $svc start failed"
echo " ✅ $svc start attempted"
else
@@ -114,8 +124,21 @@ jobs:
- name: Service status check
run: |
cd /var/lib/aitbc-workspaces/systemd-sync/repo
echo "=== AITBC Service Status ==="
for svc in aitbc-coordinator-api aitbc-exchange-api aitbc-wallet aitbc-blockchain-node aitbc-blockchain-rpc aitbc-adaptive-learning; do
mapfile -t services < <(
find systemd -maxdepth 1 -type f -name "aitbc-*.service" -printf "%f\n" |
sed 's/\.service$//' |
sort
)
if [[ ${#services[@]} -eq 0 ]]; then
echo "⚠️ No aitbc service files found"
exit 0
fi
for svc in "${services[@]}"; do
status=$(systemctl is-active "$svc" 2>/dev/null) || status="not-found"
enabled=$(systemctl is-enabled "$svc" 2>/dev/null) || enabled="not-found"
printf " %-35s active=%-10s enabled=%s\n" "$svc" "$status" "$enabled"