From c916bca5918aaf4ef32662dec652346653b443ee Mon Sep 17 00:00:00 2001 From: Henry Mercer Date: Mon, 23 Jan 2023 12:19:29 +0000 Subject: [PATCH] Compute CodeQL base directory via Action output --- .github/workflows/python-deps.yml | 28 ++++++---------------------- 1 file changed, 6 insertions(+), 22 deletions(-) diff --git a/.github/workflows/python-deps.yml b/.github/workflows/python-deps.yml index a941fa831..3025df4b1 100644 --- a/.github/workflows/python-deps.yml +++ b/.github/workflows/python-deps.yml @@ -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: |