mirror of
https://github.com/github/codeql-action.git
synced 2025-12-31 19:50:32 +08:00
Port python deps setup to windows
This commit is contained in:
60
.github/workflows/python-deps-windows.yml
vendored
Normal file
60
.github/workflows/python-deps-windows.yml
vendored
Normal file
@@ -0,0 +1,60 @@
|
||||
name: Test Python Package Installation on Windows
|
||||
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
|
||||
test-setup-python-scripts:
|
||||
runs-on: windows-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- test_dir: examples/pipenv/requests-2
|
||||
python_version: 2
|
||||
- test_dir: examples/pipenv/requests-3
|
||||
python_version: 3
|
||||
|
||||
- test_dir: examples/poetry/requests-2
|
||||
python_version: 2
|
||||
- test_dir: examples/poetry/requests-3
|
||||
python_version: 3
|
||||
|
||||
- test_dir: examples/requirements/requests-2
|
||||
python_version: 2
|
||||
- test_dir: examples/requirements/requests-3
|
||||
python_version: 3
|
||||
|
||||
- test_dir: examples/setup_py/requests-2
|
||||
python_version: 2
|
||||
- test_dir: examples/setup_py/requests-3
|
||||
python_version: 3
|
||||
|
||||
steps:
|
||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v1
|
||||
with:
|
||||
languages: python
|
||||
|
||||
- name: Test Auto Package Installation
|
||||
run: |
|
||||
$cmd = $Env:GITHUB_WORKSPACE + "\\python-setup\\install_tools.ps1"
|
||||
powershell -File $cmd
|
||||
|
||||
cd $Env:GITHUB_WORKSPACE\\${{ matrix.test_dir }}
|
||||
py -3 $Env:GITHUB_WORKSPACE\\python-setup\\auto_install_packages_windows.py C:\\hostedtoolcache\\windows\\CodeQL\\0.0.0-20200826\\x64\\codeql
|
||||
- name: Setup for extractor
|
||||
run: |
|
||||
echo $Env:CODEQL_PYTHON
|
||||
|
||||
py -3 $Env:GITHUB_WORKSPACE\\python-setup\\tests\\from_python_exe.py $Env:CODEQL_PYTHON
|
||||
- name: Verify packages installed
|
||||
run: |
|
||||
$cmd = $Env:GITHUB_WORKSPACE + "\\python-setup\\tests\\check_requests_123.ps1"
|
||||
powershell -File $cmd ${{ matrix.python_version }}
|
||||
Reference in New Issue
Block a user