File tree Expand file tree Collapse file tree 4 files changed +26
-9
lines changed
Expand file tree Collapse file tree 4 files changed +26
-9
lines changed Original file line number Diff line number Diff line change @@ -334,6 +334,7 @@ jobs:
334334 with :
335335 persist-credentials : false
336336 - name : Install latest version
337+ id : setup-uv
337338 uses : ./
338339 with :
339340 python-version : 3.13.1t
@@ -348,6 +349,19 @@ jobs:
348349 exit 1
349350 fi
350351 shell : bash
352+ - name : Verify output venv is set
353+ run : |
354+ if [ -z "$UV_VENV" ]; then
355+ echo "output venv is not set"
356+ exit 1
357+ fi
358+ if [ ! -d "$UV_VENV" ]; then
359+ echo "output venv not point to a directory: $UV_VENV"
360+ exit 1
361+ fi
362+ shell : bash
363+ env :
364+ UV_VENV : ${{ steps.setup-uv.outputs.venv }}
351365
352366 test-musl :
353367 runs-on : ubuntu-latest
Original file line number Diff line number Diff line change @@ -86,6 +86,8 @@ outputs:
8686 description : " The path to the installed uvx binary."
8787 cache-hit :
8888 description : " A boolean value to indicate a cache entry was found"
89+ venv :
90+ description : " Path to the activated venv if activate-environment is true"
8991runs :
9092 using : " node24"
9193 main : " dist/setup/index.js"
Original file line number Diff line number Diff line change @@ -213,15 +213,14 @@ async function activateEnvironment(): Promise<void> {
213213 core . info ( "Activating python venv..." ) ;
214214 await exec . exec ( "uv" , execArgs ) ;
215215
216- let venvBinPath = `${ workingDirectory } ${ path . sep } .venv${ path . sep } bin` ;
216+ const venvPath = path . resolve ( `${ workingDirectory } ${ path . sep } .venv` ) ;
217+ let venvBinPath = `${ venvPath } ${ path . sep } bin` ;
217218 if ( process . platform === "win32" ) {
218- venvBinPath = `${ workingDirectory } ${ path . sep } .venv ${ path . sep } Scripts` ;
219+ venvBinPath = `${ venvPath } ${ path . sep } Scripts` ;
219220 }
220221 core . addPath ( path . resolve ( venvBinPath ) ) ;
221- core . exportVariable (
222- "VIRTUAL_ENV" ,
223- path . resolve ( `${ workingDirectory } ${ path . sep } .venv` ) ,
224- ) ;
222+ core . exportVariable ( "VIRTUAL_ENV" , venvPath ) ;
223+ core . setOutput ( "venv" , venvPath ) ;
225224 }
226225}
227226
You can’t perform that action at this time.
0 commit comments