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

Merge branch 'fix/uv_cache_prune' into 'main'

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

See merge request to-be-continuous/python!185
parents b8044286 b18fcfdd
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