Some checks failed
API Endpoint Tests / test-api-endpoints (push) Successful in 10s
CLI Tests / test-cli (push) Failing after 41s
Integration Tests / test-service-integration (push) Successful in 2m10s
Package Tests / Python package - aitbc-agent-sdk (push) Failing after 4s
Package Tests / Python package - aitbc-core (push) Failing after 4s
Package Tests / Python package - aitbc-crypto (push) Failing after 5s
Package Tests / Python package - aitbc-sdk (push) Failing after 4s
Package Tests / JavaScript package - aitbc-sdk-js (push) Failing after 16m15s
Production Tests / Production Integration Tests (push) Failing after 7s
Python Tests / test-python (push) Failing after 1m33s
Security Scanning / security-scan (push) Failing after 3s
Staking Tests / test-staking-service (push) Failing after 2m21s
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
Package Tests / JavaScript package - aitbc-token (push) Failing after 12m54s
Added `rm -rf venv` (and `venv-build` where applicable) before venv setup in all CI workflows to ensure clean installations and prevent cache corruption issues. Removed redundant venv corruption detection and rebuild logic from package-tests.yml since explicit cleanup makes it unnecessary.
74 lines
2.0 KiB
YAML
74 lines
2.0 KiB
YAML
name: CLI Tests
|
|
|
|
on:
|
|
push:
|
|
branches: [main, develop]
|
|
paths:
|
|
- 'cli/**'
|
|
- '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
|
|
|
|
steps:
|
|
- name: Clone repository
|
|
run: |
|
|
WORKSPACE="/var/lib/aitbc-workspaces/cli-tests"
|
|
rm -rf "$WORKSPACE"
|
|
mkdir -p "$WORKSPACE"
|
|
cd "$WORKSPACE"
|
|
git clone --depth 1 http://gitea.bubuit.net:3000/oib/aitbc.git repo
|
|
|
|
- name: Setup Python environment
|
|
run: |
|
|
cd /var/lib/aitbc-workspaces/cli-tests/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"
|
|
echo "✅ Python environment ready"
|
|
|
|
- name: Verify CLI imports
|
|
run: |
|
|
cd /var/lib/aitbc-workspaces/cli-tests/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 /var/lib/aitbc-workspaces/cli-tests/repo
|
|
source venv/bin/activate
|
|
export PYTHONPATH="cli:packages/py/aitbc-sdk/src:packages/py/aitbc-crypto/src:."
|
|
|
|
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: Cleanup
|
|
if: always()
|
|
run: rm -rf /var/lib/aitbc-workspaces/cli-tests
|