ci(lint): use actions/setup-python to provision Python on runner
The act_runner service account doesn't have python in PATH. Delegating to actions/setup-python@v5 which downloads/caches Python 3.11 reliably. Also bump timeout-minutes 15 -> 20 to absorb first-run pip install.
This commit is contained in:
@@ -62,7 +62,7 @@ jobs:
|
|||||||
|
|
||||||
python:
|
python:
|
||||||
runs-on: windows-build
|
runs-on: windows-build
|
||||||
timeout-minutes: 15
|
timeout-minutes: 20
|
||||||
|
|
||||||
env:
|
env:
|
||||||
PYTHONIOENCODING: utf-8
|
PYTHONIOENCODING: utf-8
|
||||||
@@ -74,12 +74,20 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
fetch-depth: 1
|
fetch-depth: 1
|
||||||
|
|
||||||
|
- name: Setup Python 3.11
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
with:
|
||||||
|
python-version: '3.11'
|
||||||
|
|
||||||
- name: Setup venv + install package
|
- name: Setup venv + install package
|
||||||
shell: powershell
|
shell: powershell
|
||||||
run: |
|
run: |
|
||||||
$ErrorActionPreference = 'Stop'
|
$ErrorActionPreference = 'Stop'
|
||||||
|
|
||||||
|
# python is provided by actions/setup-python and is on PATH for this step.
|
||||||
$py = (Get-Command python -ErrorAction Stop).Source
|
$py = (Get-Command python -ErrorAction Stop).Source
|
||||||
|
Write-Host "Using python: $py"
|
||||||
|
|
||||||
if (-not (Test-Path "$env:VENV_DIR\Scripts\python.exe")) {
|
if (-not (Test-Path "$env:VENV_DIR\Scripts\python.exe")) {
|
||||||
Write-Host "Creating venv at $env:VENV_DIR"
|
Write-Host "Creating venv at $env:VENV_DIR"
|
||||||
& $py -m venv $env:VENV_DIR
|
& $py -m venv $env:VENV_DIR
|
||||||
|
|||||||
Reference in New Issue
Block a user