From 6ab54245d30d2187ee293cfa312ef2a3d0b9363b Mon Sep 17 00:00:00 2001 From: Aleksandr Meshchriakov Date: Mon, 23 Mar 2026 11:38:10 +0100 Subject: [PATCH] fix(ci): bootstrap python for artifact-based e2e job --- .gitea/workflows/ci-cd.yml | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) 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: