diff --git a/.github/workflows/task.yml b/.github/workflows/task.yml index 778b7369..8a551fe9 100644 --- a/.github/workflows/task.yml +++ b/.github/workflows/task.yml @@ -106,6 +106,13 @@ jobs: qemu-user-static xvfb + - name: Set up Python ${{ matrix.python_version || '3.10' }} + if: "!contains(matrix.shell, 'wsl')" + uses: actions/setup-python@v5 + with: + cache: pip + python-version: ${{ matrix.python_version || '3.10' }} + - name: Enable caching if: "!contains(matrix.shell, 'wsl')" uses: actions/cache@v4 diff --git a/tools/test-setup.sh b/tools/test-setup.sh index afbe35c7..bbf2c044 100755 --- a/tools/test-setup.sh +++ b/tools/test-setup.sh @@ -76,7 +76,8 @@ if [[ -f "/usr/bin/apt-get" ]]; then -o=Dpkg::Use-Pty=0 "${DEBS[@]}" fi fi -python3 --version +log notice Ensure python version is recent enough for using latest ansible-core +python3 -c "import sys; print(sys.version_info[:2]); sys.exit(not sys.version_info[:2]>=(3, 10))" # Ensure that git is configured properly to allow unattended commits, something # that is needed by some tasks, like devel or deps.