Compare commits

...

2 Commits

Author SHA1 Message Date
Henry Mercer
c916bca591 Compute CodeQL base directory via Action output 2023-01-23 12:49:06 +00:00
Henry Mercer
1cfa3fccb6 Log sys.path and extractor tools dir contents 2023-01-23 12:27:41 +00:00
2 changed files with 9 additions and 22 deletions

View File

@@ -1,23 +1,6 @@
name: Test Python Package Installation on Linux and Mac
on:
push:
branches: [main, releases/v2]
pull_request:
# Run checks on reopened draft PRs to support triggering PR checks on draft PRs that were opened
# by other workflows.
types: [opened, synchronize, reopened, ready_for_review]
paths:
# Changes to this workflow.
- '.github/workflows/python-deps.yml'
# Changes to the Python package installation scripts and their tests.
- 'python-setup/**'
# Changes to the default CodeQL bundle version.
- '**/defaults.json'
schedule:
# Weekly on Monday.
- cron: '0 0 * * 1'
workflow_dispatch:
on: push
jobs:
test-setup-python-scripts:
@@ -144,6 +127,7 @@ jobs:
python-version: ${{ matrix.python_version }}
- name: Initialize CodeQL
id: init
uses: ./init
with:
tools: latest
@@ -151,15 +135,15 @@ jobs:
setup-python-dependencies: false
- name: Test Auto Package Installation
env:
CODEQL_PATH: ${{ steps.init.outputs.codeql-path }}
run: |
$cmd = $Env:GITHUB_WORKSPACE + "\\python-setup\\install_tools.ps1"
powershell -File $cmd
cd $Env:GITHUB_WORKSPACE\\python-setup/tests/$Env:PYTHON_DEPS_TYPE/requests-$Env:PYTHON_VERSION
$DefaultsPath = Join-Path (Join-Path $Env:GITHUB_WORKSPACE "src") "defaults.json"
$CodeQLBundleName = (Get-Content -Raw -Path $DefaultsPath | ConvertFrom-Json).bundleVersion
$CodeQLVersion = "0.0.0-" + $CodeQLBundleName.split("-")[-1]
py -3 $Env:GITHUB_WORKSPACE\\python-setup\\auto_install_packages.py C:\\hostedtoolcache\\windows\\CodeQL\\$CodeQLVersion\\x64\\codeql
$codeql_dist = (get-item $Env:CODEQL_PATH).Directory.FullName
py -3 $Env:GITHUB_WORKSPACE\\python-setup\\auto_install_packages.py $codeql_dist
- name: Setup for extractor
run: |

View File

@@ -31,7 +31,10 @@ def suppress_stdout_stderr():
def get_extractor_version(codeql_base_dir: str, quiet: bool = True) -> int:
extractor_dir = os.path.join(codeql_base_dir, 'python', 'tools')
print(f'extractor_dir = {extractor_dir}')
print(f'extractor_dir contents = {os.listdir(extractor_dir)}')
sys.path = [extractor_dir] + sys.path
print(f'sys.path = {sys.path}')
from python_tracer import getzipfilename