From 4411ce828e3c73fcd1b3a0226012f81ca5a23dbe Mon Sep 17 00:00:00 2001 From: "Adam J. Jackson" Date: Wed, 18 Dec 2024 16:32:34 +0000 Subject: [PATCH] Try consolidating Python version logic to fewer places --- .github/workflows/test_checkout_one_os.yml | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/.github/workflows/test_checkout_one_os.yml b/.github/workflows/test_checkout_one_os.yml index eb41fd7a0..ea0de3372 100644 --- a/.github/workflows/test_checkout_one_os.yml +++ b/.github/workflows/test_checkout_one_os.yml @@ -31,23 +31,20 @@ jobs: MIN_MAX_PYTHON_VERSIONS: | 3.10 3.12 - REMAINING_PYTHON_VERSIONS: | + ALL_PYTHON_VERSIONS: | + 3.10 3.11 + 3.12 + TOX_SKIP_ENV: ${{ inputs.all-python-versions && '' || '.*?(py311).*?' }} steps: - uses: actions/checkout@v4 with: fetch-depth: 0 # Ensure tags are fetched for versioning fetch-tags: true - - name: Setup min/max supported Python versions - uses: actions/setup-python@v5 - with: - python-version: ${{ env.MIN_MAX_PYTHON_VERSIONS }} - - - name: Setup remaining supported Python versions + - name: Setup Python uses: actions/setup-python@v5 - if: inputs.all-python-versions with: - python-version: ${{ env.REMAINING_PYTHON_VERSIONS }} + python-version: ${{ inputs.all-python-versions && env.ALL_PYTHON_VERSIONS || env.MIN_MAX_PYTHON_VERSIONS}} - name: Install llvm on MacOS if: startsWith( inputs.os , 'macos' ) @@ -86,8 +83,6 @@ jobs: python -m pip install -r tests_and_analysis/ci_requirements.txt - name: Run tests - env: - TOX_SKIP_ENV: ${{ inputs.all-python-versions && '' || '.*?(py311).*?' }} shell: bash -l {0} run: python -m tox run-parallel