mirror of
https://github.com/github/codeql-action.git
synced 2025-12-10 17:54:36 +08:00
Compare commits
2 Commits
v3.26.2
...
henrymerce
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c916bca591 | ||
|
|
1cfa3fccb6 |
28
.github/workflows/python-deps.yml
vendored
28
.github/workflows/python-deps.yml
vendored
@@ -1,23 +1,6 @@
|
|||||||
name: Test Python Package Installation on Linux and Mac
|
name: Test Python Package Installation on Linux and Mac
|
||||||
|
|
||||||
on:
|
on: push
|
||||||
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:
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test-setup-python-scripts:
|
test-setup-python-scripts:
|
||||||
@@ -144,6 +127,7 @@ jobs:
|
|||||||
python-version: ${{ matrix.python_version }}
|
python-version: ${{ matrix.python_version }}
|
||||||
|
|
||||||
- name: Initialize CodeQL
|
- name: Initialize CodeQL
|
||||||
|
id: init
|
||||||
uses: ./init
|
uses: ./init
|
||||||
with:
|
with:
|
||||||
tools: latest
|
tools: latest
|
||||||
@@ -151,15 +135,15 @@ jobs:
|
|||||||
setup-python-dependencies: false
|
setup-python-dependencies: false
|
||||||
|
|
||||||
- name: Test Auto Package Installation
|
- name: Test Auto Package Installation
|
||||||
|
env:
|
||||||
|
CODEQL_PATH: ${{ steps.init.outputs.codeql-path }}
|
||||||
run: |
|
run: |
|
||||||
$cmd = $Env:GITHUB_WORKSPACE + "\\python-setup\\install_tools.ps1"
|
$cmd = $Env:GITHUB_WORKSPACE + "\\python-setup\\install_tools.ps1"
|
||||||
powershell -File $cmd
|
powershell -File $cmd
|
||||||
|
|
||||||
cd $Env:GITHUB_WORKSPACE\\python-setup/tests/$Env:PYTHON_DEPS_TYPE/requests-$Env:PYTHON_VERSION
|
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"
|
$codeql_dist = (get-item $Env:CODEQL_PATH).Directory.FullName
|
||||||
$CodeQLBundleName = (Get-Content -Raw -Path $DefaultsPath | ConvertFrom-Json).bundleVersion
|
py -3 $Env:GITHUB_WORKSPACE\\python-setup\\auto_install_packages.py $codeql_dist
|
||||||
$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
|
|
||||||
|
|
||||||
- name: Setup for extractor
|
- name: Setup for extractor
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
@@ -31,7 +31,10 @@ def suppress_stdout_stderr():
|
|||||||
|
|
||||||
def get_extractor_version(codeql_base_dir: str, quiet: bool = True) -> int:
|
def get_extractor_version(codeql_base_dir: str, quiet: bool = True) -> int:
|
||||||
extractor_dir = os.path.join(codeql_base_dir, 'python', 'tools')
|
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
|
sys.path = [extractor_dir] + sys.path
|
||||||
|
print(f'sys.path = {sys.path}')
|
||||||
|
|
||||||
from python_tracer import getzipfilename
|
from python_tracer import getzipfilename
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user