From 67dcab77248a5d34fd7ca9b064bd36ad6cd702f8 Mon Sep 17 00:00:00 2001 From: Stefano Bonicatti Date: Mon, 8 Apr 2024 17:02:54 +0200 Subject: [PATCH] Use action to select python --- .github/workflows/hosted_runners.yml | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/.github/workflows/hosted_runners.yml b/.github/workflows/hosted_runners.yml index 1be49964dda..69713b96804 100644 --- a/.github/workflows/hosted_runners.yml +++ b/.github/workflows/hosted_runners.yml @@ -658,18 +658,22 @@ jobs: coreutils \ gnu-sed + - uses: actions/setup-python@v5 + with: + python-version: '3.x' + architecture: 'x64' + - name: Install tests dependencies id: install_test_deps run: | - python_root="/usr/local/Frameworks/Python.framework/Versions/Current" - - ${python_root}/bin/pip3 install setuptools \ - pexpect==3.3 \ - psutil \ - timeout_decorator \ - six \ - thrift==0.11.0 \ - osquery + python_root=`dirname python` + pip3 install setuptools \ + pexpect==3.3 \ + psutil \ + timeout_decorator \ + six \ + thrift==0.11.0 \ + osquery echo "PYTHON_ROOT=${python_root}" >> $GITHUB_OUTPUT