fix: use --no-root in python-tests to avoid package installation issues
All checks were successful
audit / audit (push) Has been skipped
ci-cd / build (push) Has been skipped
ci / build (push) Has been skipped
autofix / fix (push) Has been skipped
python-tests / test (push) Successful in 16s
python-tests / test-specific (push) Has been skipped
security-scanning / audit (push) Has been skipped
test / test (push) Has been skipped
ci-cd / deploy (push) Has been skipped
ci / deploy (push) Has been skipped
All checks were successful
audit / audit (push) Has been skipped
ci-cd / build (push) Has been skipped
ci / build (push) Has been skipped
autofix / fix (push) Has been skipped
python-tests / test (push) Successful in 16s
python-tests / test-specific (push) Has been skipped
security-scanning / audit (push) Has been skipped
test / test (push) Has been skipped
ci-cd / deploy (push) Has been skipped
ci / deploy (push) Has been skipped
PYTHON-TESTS FIX: Avoid package installation errors Issue: Poetry install failing with 'No file/folder found for package aitbc-cli' Root cause: Complex setuptools package configuration in pyproject.toml Problem: Project configured as package but with complex multi-source structure Solution: Use --no-root flag like other workflows Changes: - install --no-root (both jobs) - Skip current project installation - Install only dependencies from poetry.lock - Maintain all other test functionality Benefits: - Avoids package installation complexity - Consistent with other workflows - Focus on dependency installation for testing - Clean separation of concerns This fixes the poetry installation failure while maintaining comprehensive test environment setup for import resolution.
This commit is contained in:
@@ -86,9 +86,9 @@ jobs:
|
||||
echo "Pip in venv: $(pip --version)"
|
||||
|
||||
echo "=== PYTHON DEPENDENCIES ==="
|
||||
# Install ALL dependencies (including current project)
|
||||
echo "Installing all dependencies with poetry..."
|
||||
$POETRY_CMD install
|
||||
# Install dependencies only (skip current project to avoid package issues)
|
||||
echo "Installing dependencies with poetry (no-root mode)..."
|
||||
$POETRY_CMD install --no-root
|
||||
|
||||
echo "=== ADDITIONAL DEPENDENCIES ==="
|
||||
# Install missing dependencies that cause import errors
|
||||
@@ -171,7 +171,7 @@ jobs:
|
||||
[ -f "$POETRY_CMD" ] && POETRY_CMD="$POETRY_CMD" || POETRY_CMD="poetry"
|
||||
|
||||
python3 -m venv venv && source venv/bin/activate
|
||||
$POETRY_CMD install
|
||||
$POETRY_CMD install --no-root
|
||||
venv/bin/pip install pydantic-settings pytest pytest-cov pytest-mock
|
||||
|
||||
export PYTHONPATH="/opt/gitea-runner/workspace/repo:$PYTHONPATH"
|
||||
|
||||
Reference in New Issue
Block a user