Some checks failed
CLI Tests / test-cli (push) Failing after 15s
Package Tests / Python package - aitbc-agent-sdk (push) Failing after 4s
Package Tests / Python package - aitbc-core (push) Failing after 2s
Package Tests / Python package - aitbc-crypto (push) Failing after 2s
Package Tests / Python package - aitbc-sdk (push) Failing after 4s
Package Tests / JavaScript package - aitbc-sdk-js (push) Failing after 26m1s
Package Tests / JavaScript package - aitbc-token (push) Failing after 27s
Python Tests / test-python (push) Failing after 20s
Staking Tests / test-staking-service (push) Failing after 10s
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
- Added --skip-requirements flag to cli-level1-tests.yml, python-tests.yml, and staking-tests.yml - Specified explicit test package dependencies via --extra-packages instead of relying on requirements files - cli-level1-tests.yml: pytest click typer rich - python-tests.yml: pytest pytest-cov pytest-mock pytest-timeout pytest-asyncio locust - staking-tests.yml: pytest pytest-asyncio - Increased
76 lines
2.1 KiB
YAML
76 lines
2.1 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" \
|
|
--skip-requirements \
|
|
--extra-packages "pytest click typer rich"
|
|
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
|