ci: add service lifecycle management and fix venv activation in workflows
Some checks failed
API Endpoint Tests / test-api-endpoints (push) Successful in 8s
Package Tests / Python package - aitbc-agent-sdk (push) Failing after 3s
Package Tests / Python package - aitbc-core (push) Failing after 3s
Package Tests / Python package - aitbc-crypto (push) Failing after 2s
Package Tests / Python package - aitbc-sdk (push) Failing after 2s
Package Tests / JavaScript package - aitbc-sdk-js (push) Successful in 3m31s
Package Tests / JavaScript package - aitbc-token (push) Failing after 8s
Production Tests / Production Integration Tests (push) Failing after 35s
Python Tests / test-python (push) Failing after 1m17s

- Added explicit service start/stop steps in api-endpoint-tests.yml
  - Start coordinator-api, exchange-api, wallet, and blockchain-rpc services before tests
  - Stop all started services in cleanup step
- Fixed venv activation in package-tests.yml
  - Changed from `source venv/bin/activate` to direct venv/bin/pip and venv/bin/python calls
  - Applied same pattern to venv-build for package building
- Fixed venv activation in production-tests.
This commit is contained in:
aitbc
2026-04-19 21:19:53 +02:00
parent a2f84648ab
commit b293059bd6
4 changed files with 46 additions and 17 deletions

View File

@@ -58,18 +58,17 @@ jobs:
--venv-dir "$PWD/venv" \
--mode copy \
--extra-packages "pytest mypy black"
source venv/bin/activate
if [[ "${{ matrix.package.name }}" == "aitbc-sdk" ]]; then
pip install -q -e "$WORKSPACE/repo/packages/py/aitbc-crypto"
venv/bin/pip install -q -e "$WORKSPACE/repo/packages/py/aitbc-crypto"
fi
# Install dependencies
if [[ -f "pyproject.toml" ]]; then
pip install -q -e ".[dev]" 2>/dev/null || pip install -q -e .
venv/bin/pip install -q -e ".[dev]" 2>/dev/null || venv/bin/pip install -q -e .
fi
if [[ -f "requirements.txt" ]]; then
pip install -q -r requirements.txt
venv/bin/pip install -q -r requirements.txt
fi
# Linting
@@ -100,8 +99,7 @@ jobs:
--venv-dir "$PWD/venv-build" \
--skip-requirements \
--extra-packages "build"
source venv-build/bin/activate
python -m build
venv-build/bin/python -m build
echo "✅ Package built"
fi