diff --git a/.gitea/workflows/package-tests.yml b/.gitea/workflows/package-tests.yml index 44f182d4..a187a283 100644 --- a/.gitea/workflows/package-tests.yml +++ b/.gitea/workflows/package-tests.yml @@ -225,7 +225,26 @@ jobs: - name: Install Dependencies run: | echo "=== INSTALLING DEPENDENCIES ===" - cd /opt/aitbc/python-packages-workspace/repo/${{ matrix.package.path }} + + # Ensure we have a valid working directory + cd /opt/aitbc/python-packages-workspace/repo/${{ matrix.package.path }} || { + echo "❌ Failed to change to package directory" + echo "Current directory: $(pwd)" + echo "Available directories:" + find /opt/aitbc/python-packages-workspace/repo -type d | head -10 + exit 1 + } + + # Validate current directory + echo "Current directory: $(pwd)" + echo "Directory contents:" + ls -la | head -10 + + # Test directory accessibility + if ! pwd >/dev/null 2>&1; then + echo "❌ Cannot access current directory" + exit 1 + fi # Ensure Poetry is available and PATH is set export PATH="$HOME/.local/bin:$PATH" @@ -238,7 +257,18 @@ jobs: fi # Verify Poetry is working - poetry --version + if ! poetry --version; then + echo "❌ Poetry not working, trying to fix..." + # Try to fix directory issues + cd / && cd /opt/aitbc/python-packages-workspace/repo/${{ matrix.package.path }} || { + echo "❌ Cannot fix directory access" + exit 1 + } + poetry --version || { + echo "❌ Poetry still not working" + exit 1 + } + fi # Check and update lock file if needed if ! poetry check --lock; then