ci: enforce strict exit codes in workflow tests
Some checks failed
API Endpoint Tests / test-api-endpoints (push) Failing after 36s
CLI Tests / test-cli (push) Failing after 3m9s
Documentation Validation / validate-docs (push) Successful in 8s
Integration Tests / test-service-integration (push) Failing after 3s
JavaScript SDK Tests / test-js-sdk (push) Successful in 7s
Package Tests / test-python-packages (map[name:aitbc-agent-sdk path:packages/py/aitbc-agent-sdk]) (push) Failing after 8s
Package Tests / test-python-packages (map[name:aitbc-core path:packages/py/aitbc-core]) (push) Failing after 29s
Package Tests / test-python-packages (map[name:aitbc-crypto path:packages/py/aitbc-crypto]) (push) Failing after 13s
Package Tests / test-python-packages (map[name:aitbc-sdk path:packages/py/aitbc-sdk]) (push) Failing after 16s
Package Tests / test-javascript-packages (map[name:aitbc-sdk-js path:packages/js/aitbc-sdk]) (push) Successful in 7s
Package Tests / test-javascript-packages (map[name:aitbc-token path:packages/solidity/aitbc-token]) (push) Failing after 18s
Python Tests / test-python (push) Failing after 3m37s
Rust ZK Components Tests / test-rust-zk (push) Successful in 28s
Security Scanning / security-scan (push) Failing after 46s
Smart Contract Tests / test-solidity (map[name:aitbc-token path:packages/solidity/aitbc-token]) (push) Failing after 18s
Smart Contract Tests / test-solidity (map[name:zk-circuits path:apps/zk-circuits]) (push) Failing after 43s
Smart Contract Tests / lint-solidity (push) Failing after 12s
Staking Tests / test-staking-service (push) Failing after 2m33s
Staking Tests / test-staking-integration (push) Has been skipped
Staking Tests / test-staking-contract (push) Has been skipped
Staking Tests / run-staking-test-runner (push) Has been skipped
Systemd Sync / sync-systemd (push) Failing after 4s

- Remove `|| echo "⚠️ ..."` fallbacks that masked failures
- Add explicit `exit 1` on port readiness failures and missing test directories
- Track port_ready flag in health check loops to fail if services don't start
- Replace warning emoji (⚠️) with error emoji () for actual failures
- Fix docs-validation to use curated Markdown target list excluding high-noise directories
- Update rust-zk-tests paths from gpu_acceleration/research to dev
This commit is contained in:
aitbc
2026-04-18 11:57:35 +02:00
parent 40698f91fd
commit 23348892b9
34 changed files with 2680 additions and 1445 deletions

View File

@@ -7,11 +7,14 @@
set -e
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
REPO_ROOT="$(cd "${SCRIPT_DIR}/.." && pwd)"
# Configuration
GENESIS_IP="10.1.223.40"
FOLLOWER_IP="<aitbc1-ip>" # Replace with actual IP
PORT=8006
CLI_PATH="/opt/aitbc/aitbc-cli"
CLI_PATH="${CLI_PATH:-${REPO_ROOT}/aitbc-cli}"
LOG_DIR="/var/log/aitbc"
LOG_FILE="${LOG_DIR}/blockchain-communication-test.log"
MONITOR_LOG="${LOG_DIR}/blockchain-monitor.log"

View File

@@ -2,17 +2,22 @@
# Test Updated Workflow Scripts
echo "=== Testing Updated Workflow Scripts ==="
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
REPO_ROOT="$(cd "${SCRIPT_DIR}/../.." && pwd)"
WORKFLOW_DIR="${REPO_ROOT}/scripts/workflow"
CLI_PATH="${REPO_ROOT}/aitbc-cli"
echo "1. Testing wallet creation script..."
/opt/aitbc/scripts/workflow/04_create_wallet.sh
"${WORKFLOW_DIR}/04_create_wallet.sh"
echo ""
echo "2. Testing final verification script..."
export WALLET_ADDR=$(/opt/aitbc/aitbc-cli wallet balance aitbc-user 2>/dev/null | grep "Address:" | awk '{print $2}' || echo "")
/opt/aitbc/scripts/workflow/06_final_verification.sh
export WALLET_ADDR=$("$CLI_PATH" wallet balance aitbc-user 2>/dev/null | grep "Address:" | awk '{print $2}' || echo "")
"${WORKFLOW_DIR}/06_final_verification.sh"
echo ""
echo "3. Testing transaction manager script..."
/opt/aitbc/scripts/workflow/09_transaction_manager.sh
"${WORKFLOW_DIR}/09_transaction_manager.sh"
echo ""
echo "✅ All script tests completed!"

View File

@@ -10,8 +10,7 @@ set -e
# Training configuration
TRAINING_PROGRAM="OpenClaw AITBC Mastery Training"
CLI_PATH="/opt/aitbc/aitbc-cli"
SCRIPT_DIR="/opt/aitbc/scripts/training"
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
LOG_DIR="/var/log/aitbc"
WALLET_NAME="openclaw-trainee"

View File

@@ -7,11 +7,14 @@
set -e
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
REPO_ROOT="$(cd "${SCRIPT_DIR}/../.." && pwd)"
# Configuration
GENESIS_IP="10.1.223.40"
FOLLOWER_IP="<aitbc1-ip>" # To be replaced during live training
PORT=8006
CLI_PATH="/opt/aitbc/aitbc-cli"
CLI_PATH="${CLI_PATH:-${REPO_ROOT}/aitbc-cli}"
# Colors for output
RED='\033[0;31m'

View File

@@ -10,7 +10,6 @@ set -e
# Training configuration
TRAINING_STAGE="Stage 4: Marketplace & Economic Intelligence"
CLI_PATH="/opt/aitbc/aitbc-cli"
LOG_FILE="/var/log/aitbc/training_stage4.log"
WALLET_NAME="openclaw-trainee"
WALLET_PASSWORD="trainee123"

View File

@@ -10,7 +10,6 @@ set -e
# Training configuration
TRAINING_STAGE="Stage 5: Expert Operations & Automation"
CLI_PATH="/opt/aitbc/aitbc-cli"
LOG_FILE="/var/log/aitbc/training_stage5.log"
WALLET_NAME="openclaw-trainee"
WALLET_PASSWORD="trainee123"
@@ -176,7 +175,7 @@ advanced_scripting() {
print_status "Advanced Automation Scripting"
print_status "Creating custom automation script..."
cat > /tmp/openclaw_automation.py << 'EOF'
cat > /tmp/openclaw_automation.py <<EOF
#!/usr/bin/env python3
"""
OpenClaw Advanced Automation Script
@@ -191,6 +190,7 @@ import logging
# Setup logging
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)
CLI_PATH = "${CLI_PATH}"
def run_command(cmd):
"""Execute AITBC CLI command and return result"""
@@ -207,13 +207,13 @@ def automated_job_submission():
logger.info("Starting automated job submission...")
# Submit inference job
success, output, error = run_command("/opt/aitbc/aitbc-cli ai submit --prompt 'Automated analysis'")
success, output, error = run_command(f"{CLI_PATH} ai submit --prompt 'Automated analysis'")
if success:
logger.info(f"Job submitted successfully: {output}")
# Monitor job completion
time.sleep(5)
success, output, error = run_command("/opt/aitbc/aitbc-cli ai list --status completed")
success, output, error = run_command(f"{CLI_PATH} ai list --status completed")
logger.info(f"Job monitoring result: {output}")
else:
logger.error(f"Job submission failed: {error}")
@@ -223,14 +223,14 @@ def automated_marketplace_monitoring():
logger.info("Starting marketplace monitoring...")
# Check marketplace status
success, output, error = run_command("/opt/aitbc/aitbc-cli market list")
success, output, error = run_command(f"{CLI_PATH} market list")
if success:
logger.info(f"Marketplace status: {output}")
# Simple trading logic - place buy order for low-priced items
if "test-item" in output:
success, output, error = run_command("/opt/aitbc/aitbc-cli market buy --item test-item --price 25")
success, output, error = run_command(f"{CLI_PATH} market buy --item test-item --price 25")
logger.info(f"Buy order placed: {output}")
else:
logger.error(f"Marketplace monitoring failed: {error}")

View File

@@ -6,12 +6,15 @@
# Version: 1.0
# Last Updated: 2026-04-02
TRAINING_LIB_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
REPO_ROOT="$(cd "${TRAINING_LIB_DIR}/../.." && pwd)"
# ============================================================================
# CONFIGURATION
# ============================================================================
# Default configuration (can be overridden)
export CLI_PATH="${CLI_PATH:-/opt/aitbc/aitbc-cli}"
export CLI_PATH="${CLI_PATH:-${REPO_ROOT}/aitbc-cli}"
export LOG_DIR="${LOG_DIR:-/var/log/aitbc}"
export WALLET_NAME="${WALLET_NAME:-openclaw-trainee}"
export WALLET_PASSWORD="${WALLET_PASSWORD:-trainee123}"

View File

@@ -4,33 +4,37 @@
set -e # Exit on any error
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
REPO_ROOT="$(cd "${SCRIPT_DIR}/../.." && pwd)"
CLI_PATH="${REPO_ROOT}/aitbc-cli"
echo "=== AITBC Wallet Creation (Enhanced CLI) ==="
echo "1. Pre-creation verification..."
echo "=== Current wallets on aitbc ==="
/opt/aitbc/aitbc-cli wallet list
"$CLI_PATH" wallet list
echo "2. Creating new wallet on aitbc..."
/opt/aitbc/aitbc-cli wallet create aitbc-user $(cat /var/lib/aitbc/keystore/.password)
"$CLI_PATH" wallet create aitbc-user $(cat /var/lib/aitbc/keystore/.password)
# Get wallet address using CLI
WALLET_ADDR=$(/opt/aitbc/aitbc-cli wallet balance aitbc-user 2>/dev/null | grep "Address:" | awk '{print $2}' || echo "")
WALLET_ADDR=$("$CLI_PATH" wallet balance aitbc-user 2>/dev/null | grep "Address:" | awk '{print $2}' || echo "")
echo "New wallet address: $WALLET_ADDR"
# Verify wallet was created successfully using CLI
echo "3. Post-creation verification..."
echo "=== Updated wallet list ==="
/opt/aitbc/aitbc-cli wallet list | grep aitbc-user || echo "Wallet not found in list"
"$CLI_PATH" wallet list | grep aitbc-user || echo "Wallet not found in list"
echo "=== New wallet details ==="
/opt/aitbc/aitbc-cli wallet balance aitbc-user
"$CLI_PATH" wallet balance aitbc-user
echo "=== All wallets summary ==="
/opt/aitbc/aitbc-cli wallet list
"$CLI_PATH" wallet list
echo "4. Cross-node verification..."
echo "=== Network status (local) ==="
/opt/aitbc/aitbc-cli network status 2>/dev/null || echo "Network status not available"
"$CLI_PATH" network status 2>/dev/null || echo "Network status not available"
echo "✅ Wallet created successfully using enhanced CLI!"
echo "Wallet name: aitbc-user"

View File

@@ -4,6 +4,10 @@
set -e # Exit on any error
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
REPO_ROOT="$(cd "${SCRIPT_DIR}/../.." && pwd)"
CLI_PATH="${REPO_ROOT}/aitbc-cli"
echo "=== AITBC Multi-Node Blockchain Final Verification ==="
# Get wallet address (source from wallet creation script)
@@ -34,18 +38,18 @@ echo "Height difference: $HEIGHT_DIFF blocks"
# Check wallet balance using CLI
echo "2. Checking aitbc wallet balance..."
echo "=== aitbc wallet balance (local) ==="
BALANCE=$(/opt/aitbc/aitbc-cli wallet balance aitbc-user 2>/dev/null | grep "Balance:" | awk '{print $2}' || echo "0")
BALANCE=$("$CLI_PATH" wallet balance aitbc-user 2>/dev/null | grep "Balance:" | awk '{print $2}' || echo "0")
echo $BALANCE AIT
# Get blockchain information using CLI
echo "3. Blockchain information..."
echo "=== Chain Information ==="
/opt/aitbc/aitbc-cli blockchain info
"$CLI_PATH" blockchain info
# Network health check using CLI
echo "4. Network health check..."
echo "=== Network Status (local) ==="
/opt/aitbc/aitbc-cli network status 2>/dev/null || echo "Network status not available"
"$CLI_PATH" network status 2>/dev/null || echo "Network status not available"
# Service status
echo "5. Service status..."

View File

@@ -4,6 +4,10 @@
echo "=== AITBC Transaction Manager ==="
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
REPO_ROOT="$(cd "${SCRIPT_DIR}/../.." && pwd)"
CLI_PATH="${REPO_ROOT}/aitbc-cli"
# Configuration
GENESIS_WALLET="aitbc1genesis"
TARGET_WALLET="aitbc-user"
@@ -21,7 +25,7 @@ fi
# Get wallet addresses
echo "2. Getting wallet addresses..."
GENESIS_ADDR=$(cat /var/lib/aitbc/keystore/aitbc1genesis.json | jq -r '.address')
TARGET_ADDR=$(/opt/aitbc/aitbc-cli wallet balance aitbc-user 2>/dev/null | grep "Address:" | awk '{print $2}' || echo "")
TARGET_ADDR=$("$CLI_PATH" wallet balance aitbc-user 2>/dev/null | grep "Address:" | awk '{print $2}' || echo "")
echo "Genesis address: $GENESIS_ADDR"
echo "Target address: $TARGET_ADDR"
@@ -92,7 +96,7 @@ else
# Try alternative method using CLI
echo "7. Trying alternative CLI method..."
PASSWORD=$(cat $PASSWORD_FILE)
/opt/aitbc/aitbc-cli wallet send $GENESIS_WALLET $TARGET_ADDR $AMOUNT $PASSWORD
"$CLI_PATH" wallet send $GENESIS_WALLET $TARGET_ADDR $AMOUNT $PASSWORD
fi
# Final verification