Files
aitbc/.gitea/workflows/cli-level1-tests.yml
aitbc 75d0588e29
Some checks failed
CLI Tests / test-cli (push) Failing after 3m52s
ci: remove --skip-requirements and --extra-packages flags from cli-level1-tests venv setup
Reverted to standard requirements.txt installation instead of explicit test package dependencies, aligning with the default behavior of setup-python-venv.sh script.
2026-04-20 06:51:26 +02:00

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