Skip to content

Commit 5794d96

Browse files
authored
Merge pull request #1502 from github/henrymercer/python-packages-use-path-from-action
Use CodeQL path from `init` Action in Windows Python dependencies PR checks
2 parents 421a1b3 + 64580b3 commit 5794d96

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

.github/workflows/python-deps.yml

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Test Python Package Installation on Linux and Mac
1+
name: Test Python Package Installation
22

33
on:
44
push:
@@ -144,22 +144,23 @@ jobs:
144144
python-version: ${{ matrix.python_version }}
145145

146146
- name: Initialize CodeQL
147+
id: init
147148
uses: ./init
148149
with:
149150
tools: latest
150151
languages: python
151152
setup-python-dependencies: false
152153

153154
- name: Test Auto Package Installation
155+
env:
156+
CODEQL_PATH: ${{ steps.init.outputs.codeql-path }}
154157
run: |
155158
$cmd = $Env:GITHUB_WORKSPACE + "\\python-setup\\install_tools.ps1"
156159
powershell -File $cmd
157160
158161
cd $Env:GITHUB_WORKSPACE\\python-setup/tests/$Env:PYTHON_DEPS_TYPE/requests-$Env:PYTHON_VERSION
159-
$DefaultsPath = Join-Path (Join-Path $Env:GITHUB_WORKSPACE "src") "defaults.json"
160-
$CodeQLBundleName = (Get-Content -Raw -Path $DefaultsPath | ConvertFrom-Json).bundleVersion
161-
$CodeQLVersion = "0.0.0-" + $CodeQLBundleName.split("-")[-1]
162-
py -3 $Env:GITHUB_WORKSPACE\\python-setup\\auto_install_packages.py C:\\hostedtoolcache\\windows\\CodeQL\\$CodeQLVersion\\x64\\codeql
162+
$codeql_dist = (get-item $Env:CODEQL_PATH).Directory.FullName
163+
py -3 $Env:GITHUB_WORKSPACE\\python-setup\\auto_install_packages.py $codeql_dist
163164
164165
- name: Setup for extractor
165166
run: |

0 commit comments

Comments
 (0)