Fix Test Package Installation step to handle missing directories gracefully
Some checks failed
package-tests / test-python-packages (map[name:aitbc-agent-sdk path:packages/py/aitbc-agent-sdk python_version:3.13]) (push) Failing after 8s
package-tests / test-python-packages (map[name:aitbc-cli path:. python_version:3.13]) (push) Successful in 13s
package-tests / test-python-packages (map[name:aitbc-core path:packages/py/aitbc-core python_version:3.13]) (push) Failing after 5s
package-tests / test-python-packages (map[name:aitbc-crypto path:packages/py/aitbc-crypto python_version:3.13]) (push) Failing after 5s
package-tests / test-python-packages (map[name:aitbc-sdk path:packages/py/aitbc-sdk python_version:3.13]) (push) Successful in 10s
package-tests / test-javascript-packages (map[name:aitbc-sdk node_version:24 path:packages/js/aitbc-sdk]) (push) Successful in 8s
package-tests / cross-language-compatibility (push) Has been skipped
package-tests / package-integration-tests (push) Has been skipped
security-scanning / audit (push) Successful in 18s

This commit is contained in:
aitbc1
2026-03-28 13:01:16 +01:00
parent 1d14572a01
commit 042328804b

View File

@@ -949,26 +949,35 @@ jobs:
echo "=== TESTING PACKAGE INSTALLATION ===" echo "=== TESTING PACKAGE INSTALLATION ==="
# Test Python package installation # Test Python package installation
echo "Testing Python package installation..." if [[ -d "packages/py/aitbc-core" ]]; then
cd packages/py/aitbc-core echo "Testing Python package installation..."
cd packages/py/aitbc-core
# Install Poetry if not available
if ! command -v poetry >/dev/null 2>&1; then # Install Poetry if not available
curl -sSL https://install.python-poetry.org | python3 - if ! command -v poetry >/dev/null 2>&1; then
export PATH="$HOME/.local/bin:$PATH" curl -sSL https://install.python-poetry.org | python3 -
export PATH="$HOME/.local/bin:$PATH"
fi
# Test installation
poetry install
poetry show
cd ../../..
else
echo "⚠️ packages/py/aitbc-core not found, skipping Python installation test"
fi fi
# Test installation
poetry install
poetry show
cd ../../..
# Test JavaScript package installation # Test JavaScript package installation
echo "Testing JavaScript package installation..." if [[ -d "packages/js/aitbc-sdk" ]]; then
cd packages/js/aitbc-sdk echo "Testing JavaScript package installation..."
npm install --legacy-peer-deps cd packages/js/aitbc-sdk
npm list --depth=0 npm install --legacy-peer-deps
npm list --depth=0
cd ../../..
else
echo "⚠️ packages/js/aitbc-sdk not found, skipping JavaScript installation test"
fi
echo "✅ Package installation tests completed" echo "✅ Package installation tests completed"