Commit b18fcfdd authored by Gaëtan Montury's avatar Gaëtan Montury
Browse files

fix(uv): add prune cache CI to the new finish_job_action function

parent b8044286
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -1452,6 +1452,14 @@ variables:
  }


  function cleanup_uv_cache() {
    # uv build system configuration doesn't guarantee uv usage across all jobs.
    if command -v uv &> /dev/null
    then
      uv cache prune --ci
    fi
  }

  unscope_variables
  eval_all_secrets

@@ -1506,6 +1514,10 @@ stages:
    - enforce_python_cmd
    - cd ${PYTHON_PROJECT_DIR}
    - guess_build_system
    - | 
      if [[ "$PYTHON_BUILD_SYSTEM" =~ ^uv ]]; then
        trap "cleanup_uv_cache" EXIT
      fi

.python-test:
  extends: .python-base