Skip to content

Commit 395d2bc

Browse files
committed
python 3.10 + change default python for npm
1 parent 6e56bc3 commit 395d2bc

1 file changed

Lines changed: 16 additions & 4 deletions

File tree

.github/workflows/pull-request-review.yml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,22 @@ jobs:
2424
with:
2525
node-version: ${{ matrix.node }}
2626

27-
# - name: Set up Python
28-
# uses: actions/setup-python@v5
29-
# with:
30-
# python-version: '3.10'
27+
- name: Set up Python
28+
if: startsWith(matrix.os, 'windows')
29+
id: py
30+
uses: actions/setup-python@v5
31+
with:
32+
python-version: '3.10'
33+
34+
- name: Force npm to use this Python
35+
if: startsWith(matrix.os, 'windows')
36+
shell: pwsh
37+
run: |
38+
# setup-python exposes $env:PythonLocation
39+
echo "npm_config_python=$env:PythonLocation\python.exe" | Out-File -FilePath $env:GITHUB_ENV -Append
40+
npm config set python "$env:PythonLocation\python.exe"
41+
python --version
42+
npm config get python
3143
3244
# - name: Pin node-gyp 10 on Windows
3345
# if: startsWith(matrix.os, 'windows')

0 commit comments

Comments
 (0)