Remove PYTHONPATH from package-tests to rely on editable install
Some checks failed
Package Tests / Python package - aitbc-agent-sdk (push) Successful in 15s
Package Tests / Python package - aitbc-core (push) Failing after 17s
Package Tests / Python package - aitbc-crypto (push) Successful in 12s
Package Tests / Python package - aitbc-sdk (push) Successful in 13s
Package Tests / JavaScript package - aitbc-sdk-js (push) Successful in 6s
Package Tests / JavaScript package - aitbc-token (push) Successful in 16s

This commit is contained in:
aitbc
2026-04-27 08:42:43 +02:00
parent 8df40c1860
commit 90a47bf555

View File

@@ -93,7 +93,8 @@ jobs:
# Tests
echo "=== Tests ==="
if [[ -d "tests" ]]; then
export PYTHONPATH="$PWD/src:$WORKSPACE/repo:$PYTHONPATH"
# SECURITY FIX: Don't set PYTHONPATH - rely on editable package install
# This avoids namespace conflicts with the main aitbc package
echo "=== Debug Info ==="
echo "PWD: $PWD"
echo "PYTHONPATH: $PYTHONPATH"
@@ -102,6 +103,8 @@ jobs:
venv/bin/python -m pip show aitbc-core || echo "aitbc-core not installed"
echo "=== Import Test ==="
venv/bin/python -c "import sys; print('Python paths:'); [print(p) for p in sys.path]"
echo "=== Test Import ==="
venv/bin/python -c "from aitbc.logging import StructuredLogFormatter; print('Import successful')" || echo "Import failed"
echo "=== Running Tests ==="
venv/bin/python -m pytest tests/ -q --tb=short
else