From 671066a6f57b6401638c66a0a34ebb391056e0fc Mon Sep 17 00:00:00 2001 From: aitbc1 Date: Fri, 27 Mar 2026 20:40:17 +0100 Subject: [PATCH] fix: use --no-root in python-tests to avoid package installation issues 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. --- .gitea/workflows/python-tests.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitea/workflows/python-tests.yml b/.gitea/workflows/python-tests.yml index f2902477..62b2247f 100644 --- a/.gitea/workflows/python-tests.yml +++ b/.gitea/workflows/python-tests.yml @@ -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"