@@ -284,6 +284,108 @@ jobs:
284284 with :
285285 python-version-file : .tool-versions
286286
287+ setup-versions-from-pipfile-with-python_version :
288+ name : Setup ${{ matrix.python }} ${{ matrix.os }} Pipfile with python_version
289+ runs-on : ${{ matrix.os }}
290+ strategy :
291+ fail-fast : false
292+ matrix :
293+ os :
294+ [
295+ macos-latest,
296+ windows-latest,
297+ ubuntu-20.04,
298+ ubuntu-22.04,
299+ ubuntu-22.04-arm,
300+ macos-13,
301+ ubuntu-latest,
302+ ubuntu-24.04-arm
303+ ]
304+ python : [3.9.13, 3.10.11, 3.11.9, 3.13.2]
305+ steps :
306+ - name : Checkout
307+ uses : actions/checkout@v4
308+
309+ - name : build-version-file ${{ matrix.python }}
310+ run : |
311+ echo '[requires]
312+ python_version = "${{ matrix.python }}"
313+ ' > Pipenv
314+
315+ - name : setup-python ${{ matrix.python }}
316+ id : setup-python
317+ uses : ./
318+ with :
319+ python-version-file : Pipenv
320+
321+ - name : Check python-path
322+ run : ./__tests__/check-python-path.sh '${{ steps.setup-python.outputs.python-path }}'
323+ shell : bash
324+
325+ - name : Validate version
326+ run : |
327+ $pythonVersion = (python --version)
328+ if ("Python ${{ matrix.python }}".replace("==", "") -ne "$pythonVersion"){
329+ Write-Host "The current version is $pythonVersion; expected version is ${{ matrix.python }}"
330+ exit 1
331+ }
332+ $pythonVersion
333+ shell : pwsh
334+
335+ - name : Run simple code
336+ run : python -c 'import math; print(math.factorial(5))'
337+
338+ setup-versions-from-pipfile-with-python_full_version :
339+ name : Setup ${{ matrix.python }} ${{ matrix.os }} Pipfile with python_full_version
340+ runs-on : ${{ matrix.os }}
341+ strategy :
342+ fail-fast : false
343+ matrix :
344+ os :
345+ [
346+ macos-latest,
347+ windows-latest,
348+ ubuntu-20.04,
349+ ubuntu-22.04,
350+ ubuntu-22.04-arm,
351+ macos-13,
352+ ubuntu-latest,
353+ ubuntu-24.04-arm
354+ ]
355+ python : [3.9.13, 3.10.11, 3.11.9, 3.13.2]
356+ steps :
357+ - name : Checkout
358+ uses : actions/checkout@v4
359+
360+ - name : build-version-file ${{ matrix.python }}
361+ run : |
362+ echo '[requires]
363+ python_full_version = "${{ matrix.python }}"
364+ ' > Pipenv
365+
366+ - name : setup-python ${{ matrix.python }}
367+ id : setup-python
368+ uses : ./
369+ with :
370+ python-version-file : Pipenv
371+
372+ - name : Check python-path
373+ run : ./__tests__/check-python-path.sh '${{ steps.setup-python.outputs.python-path }}'
374+ shell : bash
375+
376+ - name : Validate version
377+ run : |
378+ $pythonVersion = (python --version)
379+ if ("Python ${{ matrix.python }}".replace("==", "") -ne "$pythonVersion"){
380+ Write-Host "The current version is $pythonVersion; expected version is ${{ matrix.python }}"
381+ exit 1
382+ }
383+ $pythonVersion
384+ shell : pwsh
385+
386+ - name : Run simple code
387+ run : python -c 'import math; print(math.factorial(5))'
388+
287389 setup-pre-release-version-from-manifest :
288390 name : Setup 3.14.0-alpha.6 ${{ matrix.os }}
289391 runs-on : ${{ matrix.os }}
0 commit comments