diff --git a/.gitea/workflows/ci-cd.yml b/.gitea/workflows/ci-cd.yml index 1df71e6..40b11ad 100644 --- a/.gitea/workflows/ci-cd.yml +++ b/.gitea/workflows/ci-cd.yml @@ -232,10 +232,31 @@ jobs: with: name: ci-test-workspace + - name: Install Python and uv for artifact environment + run: | + set -euo pipefail + if command -v python3.11 >/dev/null 2>&1; then + BOOTSTRAP_PYTHON=python3.11 + elif command -v python3 >/dev/null 2>&1; then + BOOTSTRAP_PYTHON=python3 + else + echo "python3 is not available on the runner" >&2 + exit 1 + fi + + timeout 180s "${BOOTSTRAP_PYTHON}" -m pip install --user --break-system-packages --upgrade pip uv + export PATH="$HOME/.local/bin:$PATH" + timeout 300s uv python install "${PYTHON_VERSION}" + - name: Extract prepared test workspace run: | set -euo pipefail - tar -xzf ci-test-workspace.tar.gz + ARCHIVE_PATH="$(find . -maxdepth 2 -name 'ci-test-workspace.tar.gz' -print -quit)" + if [ -z "${ARCHIVE_PATH}" ]; then + echo "ci-test-workspace.tar.gz not found after artifact download" >&2 + exit 1 + fi + tar -xzf "${ARCHIVE_PATH}" - name: Run API inventory pytest suite env: