@@ -852,7 +852,7 @@ jobs:
852852 persist-credentials : false
853853 - name : Verify Python install dir is not populated
854854 run : |
855- if [ -d ~/.local/share/uv/ python ]; then
855+ if [ -d /home/runner/work/_temp/uv- python-dir ]; then
856856 echo "Python install dir should not exist"
857857 exit 1
858858 fi
@@ -866,7 +866,7 @@ jobs:
866866 working-directory : __tests__/fixtures/uv-project
867867 - name : Verify Python install dir exists
868868 run : |
869- if [ ! -d ~/.local/share/uv/ python ]; then
869+ if [ ! -d /home/runner/work/_temp/uv- python-dir ]; then
870870 echo "Python install dir should exist"
871871 exit 1
872872 fi
@@ -879,7 +879,7 @@ jobs:
879879 persist-credentials : false
880880 - name : Verify Python install dir does not exist
881881 run : |
882- if [ -d ~/.local/share/uv/ python ]; then
882+ if [ -d /home/runner/work/_temp/uv- python-dir ]; then
883883 echo "Python install dir should not exist"
884884 exit 1
885885 fi
@@ -892,7 +892,7 @@ jobs:
892892 cache-suffix : ${{ github.run_id }}-${{ github.run_attempt }}-test-cache-python-installs
893893 - name : Verify Python install dir exists
894894 run : |
895- if [ ! -d ~/.local/share/uv/ python ]; then
895+ if [ ! -d /home/runner/work/_temp/uv- python-dir ]; then
896896 echo "Python install dir should exist"
897897 exit 1
898898 fi
@@ -906,6 +906,34 @@ jobs:
906906 - run : uv sync --managed-python
907907 working-directory : __tests__/fixtures/uv-project
908908
909+ test-python-install-dir :
910+ strategy :
911+ matrix :
912+ inputs :
913+ - os : ubuntu-latest
914+ expected-python-dir : " /home/runner/work/_temp/uv-python-dir"
915+ - os : windows-latest
916+ expected-python-dir : " D:\\ a\\ _temp\\ uv-python-dir"
917+ - os : selfhosted-ubuntu-arm64
918+ expected-python-dir : " /home/ubuntu/.local/share/uv/python"
919+ runs-on : ${{ matrix.inputs.os }}
920+ steps :
921+ - uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
922+ with :
923+ persist-credentials : false
924+ - name : Install latest version
925+ id : setup-uv
926+ uses : ./
927+ - name : Check Python dir is expected dir
928+ run : |
929+ if [ "$UV_PYTHON_INSTALL_DIR" != "${{ matrix.inputs.expected-python-dir }}" ]; then
930+ echo "Wrong UV_PYTHON_INSTALL_DIR: UV_PYTHON_INSTALL_DIR"
931+ exit 1
932+ fi
933+ shell : bash
934+ - name : Install python works
935+ run : uv python install
936+
909937 all-tests-passed :
910938 runs-on : ubuntu-latest
911939 needs :
@@ -950,6 +978,7 @@ jobs:
950978 - test-cache-dir-from-file
951979 - test-cache-python-installs
952980 - test-restore-python-installs
981+ - test-python-install-dir
953982 if : always()
954983 steps :
955984 - name : All tests passed
0 commit comments