Some checks failed
API Endpoint Tests / test-api-endpoints (push) Has been cancelled
Cross-Node Transaction Testing / transaction-test (push) Has been cancelled
Deploy to Testnet / deploy-testnet (push) Has been cancelled
Integration Tests / test-service-integration (push) Has been cancelled
Multi-Node Stress Testing / stress-test (push) Has been cancelled
Production Tests / Production Integration Tests (push) Has been cancelled
Python Tests / test-python (push) Has been cancelled
Security Scanning / security-scan (push) Has been cancelled
CLI Tests / test-cli (push) Failing after 3s
- Added /v1 prefix to all business logic routers in coordinator-api (analytics, portfolio, reputation, rewards, staking) - Updated agent-coordinator to include /v1 prefix for all routers - Changed agent-management API prefix from /api/v1 to /v1 - Updated api-gateway service prefixes to include /v1 for all proxied services - Fixed coordinator-api routers to use correct service imports (AgentServiceMarketplace instead
109 lines
3.1 KiB
YAML
109 lines
3.1 KiB
YAML
name: CLI Tests
|
|
|
|
on:
|
|
push:
|
|
branches: [main, develop]
|
|
paths:
|
|
- 'cli/**'
|
|
- 'tests/cli-test-*.sh'
|
|
- 'pyproject.toml'
|
|
- '.gitea/workflows/cli-level1-tests.yml'
|
|
pull_request:
|
|
branches: [main, develop]
|
|
workflow_dispatch:
|
|
|
|
concurrency:
|
|
group: cli-tests-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
test-cli:
|
|
runs-on: debian
|
|
timeout-minutes: 10
|
|
|
|
env:
|
|
WORKSPACE: /var/lib/aitbc-workspaces/cli-tests
|
|
|
|
steps:
|
|
- name: Clone repository
|
|
run: |
|
|
rm -rf "${{ env.WORKSPACE }}"
|
|
mkdir -p "${{ env.WORKSPACE }}"
|
|
cd "${{ env.WORKSPACE }}"
|
|
git clone --depth 1 http://gitea.bubuit.net:3000/oib/aitbc.git repo
|
|
|
|
- name: Initialize job logging
|
|
run: |
|
|
cd "${{ env.WORKSPACE }}/repo"
|
|
bash scripts/ci/setup-job-logging.sh
|
|
|
|
- name: Setup Python environment
|
|
run: |
|
|
cd "${{ env.WORKSPACE }}/repo"
|
|
|
|
# Remove any existing venv to avoid cache corruption issues
|
|
rm -rf venv
|
|
|
|
# Ensure standard directories exist
|
|
mkdir -p /var/lib/aitbc/data /var/lib/aitbc/keystore /etc/aitbc /var/log/aitbc
|
|
|
|
bash scripts/ci/setup-python-venv.sh \
|
|
--repo-dir "$PWD" \
|
|
--venv-dir "$PWD/venv" \
|
|
--requirements-file "$PWD/cli/requirements-cli.txt" \
|
|
--extra-packages "PyYAML requests cryptography pydantic pydantic-settings fastapi httpx"
|
|
echo "✅ Python environment ready"
|
|
|
|
- name: Verify CLI imports
|
|
run: |
|
|
cd "${{ env.WORKSPACE }}/repo"
|
|
source venv/bin/activate
|
|
export PYTHONPATH="cli:packages/py/aitbc-sdk/src:packages/py/aitbc-crypto/src:."
|
|
|
|
python3 -c "from core.main import cli; print('✅ CLI imports OK')"
|
|
|
|
- name: Run CLI tests
|
|
run: |
|
|
cd "${{ env.WORKSPACE }}/repo"
|
|
source venv/bin/activate
|
|
export PYTHONPATH="cli:packages/py/aitbc-sdk/src:packages/py/aitbc-crypto/src:."
|
|
|
|
# Test both chains for blockchain commands
|
|
export CHAINS="ait-mainnet,ait-testnet"
|
|
|
|
if [[ -d "cli/tests" ]]; then
|
|
# Run the CLI test runner that uses virtual environment
|
|
python3 cli/tests/run_cli_tests.py
|
|
else
|
|
echo "❌ No CLI tests directory"
|
|
exit 1
|
|
fi
|
|
|
|
echo "✅ CLI tests completed"
|
|
|
|
- name: Run /v1 prefix verification
|
|
run: |
|
|
cd "${{ env.WORKSPACE }}/repo"
|
|
|
|
if [[ -f "tests/cli-test-v1-prefix.sh" ]]; then
|
|
bash tests/cli-test-v1-prefix.sh
|
|
echo "✅ /v1 prefix verification completed"
|
|
else
|
|
echo "⚠️ /v1 prefix verification script not found"
|
|
fi
|
|
|
|
- name: Run CLI command tests
|
|
run: |
|
|
cd "${{ env.WORKSPACE }}/repo"
|
|
|
|
if [[ -f "tests/cli-test-commands.sh" ]]; then
|
|
bash tests/cli-test-commands.sh
|
|
echo "✅ CLI command tests completed"
|
|
else
|
|
echo "⚠️ CLI command tests script not found"
|
|
fi
|
|
|
|
- name: Cleanup
|
|
if: always()
|
|
run: rm -rf "${{ env.WORKSPACE }}"
|