From a5810520e42138d557017168a5797e8cea347d91 Mon Sep 17 00:00:00 2001 From: Brad Keryan Date: Mon, 12 Oct 2026 10:50:15 -0500 Subject: [PATCH 1/5] tests: Add Python 3.15, remove Python 3.9, unlock PyPy, reduce versions for cache testing --- .github/workflows/test_actions.yml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test_actions.yml b/.github/workflows/test_actions.yml index 032c24e..db156b9 100644 --- a/.github/workflows/test_actions.yml +++ b/.github/workflows/test_actions.yml @@ -13,8 +13,7 @@ jobs: strategy: matrix: os: [windows-latest, ubuntu-latest, macos-latest] - # pypy3.11-7.3.20 is a workaround for https://github.com/pypy/pypy/issues/5388 - Regression in 7.3.21: OpenSSL prints verbosely - python-version: [3.9, '3.10', 3.11, 3.12, 3.13, 3.13t, 3.14, 3.14t, pypy3.11-7.3.20] + python-version: ['3.10', 3.11, 3.12, 3.13, 3.13t, 3.14, 3.14t, 3.15, 3.15t, pypy3.11] steps: - name: Check out repo uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 @@ -77,7 +76,7 @@ jobs: strategy: matrix: os: [windows-latest, ubuntu-latest, macos-latest] - python-version: [3.9, '3.10', 3.11, 3.12, 3.13, 3.14, 3.14t, pypy3.11-7.3.20] + python-version: ['3.10', 3.11, 3.12, 3.13, 3.14, 3.14t, 3.15, 3.15t, pypy3.11] steps: - name: Check out repo uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 @@ -106,7 +105,7 @@ jobs: strategy: matrix: os: [windows-latest, ubuntu-latest, macos-latest] - python-version: [3.9, '3.10', 3.11, 3.12, 3.13, 3.14, 3.14t, pypy3.11-7.3.20] + python-version: [3.13] steps: - name: Check out repo uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 @@ -140,7 +139,7 @@ jobs: strategy: matrix: os: [windows-latest, ubuntu-latest, macos-latest] - python-version: [3.9, '3.10', 3.11, 3.12, 3.13, 3.14, 3.14t, pypy3.11-7.3.20] + python-version: [3.13] steps: - name: Check out repo uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 @@ -318,7 +317,7 @@ jobs: fail-fast: false # If there are failures, sometimes it is instructive to see which combinations passed matrix: os: [windows-latest, ubuntu-latest, macos-latest] - python-version: [3.9, '3.10', 3.11, 3.12, 3.13, 3.14, 3.14t, pypy3.11-7.3.20] + python-version: ['3.10', 3.11, 3.12, 3.13, 3.14, 3.14t, 3.15, 3.15t, pypy3.11] steps: - name: Check out repo uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 @@ -419,7 +418,7 @@ jobs: strategy: matrix: os: [windows-latest, ubuntu-latest, macos-latest] - python-version: [3.9, '3.10', 3.11, 3.12, 3.13, 3.14, 3.14t, pypy3.11-7.3.20] + python-version: [3.13] steps: - name: Check out repo uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 @@ -479,7 +478,7 @@ jobs: strategy: matrix: os: [windows-latest, ubuntu-latest, macos-latest] - python-version: [3.9, '3.10', 3.11, 3.12, 3.13, 3.14, 3.14t, pypy3.11-7.3.20] + python-version: [3.13] steps: - name: Check out repo uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 From f80cc08bdf1adb376f08008df635e924e8e901ad Mon Sep 17 00:00:00 2001 From: Brad Keryan Date: Mon, 12 Oct 2026 11:35:55 -0500 Subject: [PATCH 2/5] tests: Upgrade pip if necessary --- .github/workflows/test_actions.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test_actions.yml b/.github/workflows/test_actions.yml index db156b9..a4f4e02 100644 --- a/.github/workflows/test_actions.yml +++ b/.github/workflows/test_actions.yml @@ -378,6 +378,7 @@ jobs: - name: Check for expected dependencies run: | echo "Checking for expected packages from extras and dependency groups..." + poetry run python -m ensurepip --upgrade pip_list=$(poetry run pip list) echo "Installed packages:" echo "$pip_list" From 75e5bdfdc91c41f23b8009d946ce4459274ff51d Mon Sep 17 00:00:00 2001 From: Brad Keryan Date: Mon, 12 Oct 2026 11:49:48 -0500 Subject: [PATCH 3/5] docs: Update versions in setup-python example --- setup-python/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup-python/README.md b/setup-python/README.md index d6c4f14..c3aa447 100644 --- a/setup-python/README.md +++ b/setup-python/README.md @@ -27,7 +27,7 @@ You can specify the `python-version` input for testing with multiple versions of ```yaml strategy: matrix: - python-version: [3.9, '3.10', 3.11, 3.12, 3.13] + python-version: ['3.10', 3.11, 3.12, 3.13, 3.14, 3.14t, 3.15, 3.15t] steps: - uses: ni/python-actions/setup-python@v0 with: From 803a62209ebb55a9a995b0e911fe7fad08e4f383 Mon Sep 17 00:00:00 2001 From: Brad Keryan Date: Mon, 12 Oct 2026 15:29:25 -0500 Subject: [PATCH 4/5] tests: Remove dependency on pip --- .github/workflows/test_actions.yml | 48 +++++++++++++----------------- 1 file changed, 21 insertions(+), 27 deletions(-) diff --git a/.github/workflows/test_actions.yml b/.github/workflows/test_actions.yml index a4f4e02..c4d8c95 100644 --- a/.github/workflows/test_actions.yml +++ b/.github/workflows/test_actions.yml @@ -377,39 +377,33 @@ jobs: install-args: "--extras 'colors serialization' --with dev,docs,utils" - name: Check for expected dependencies run: | - echo "Checking for expected packages from extras and dependency groups..." - poetry run python -m ensurepip --upgrade - pip_list=$(poetry run pip list) - echo "Installed packages:" - echo "$pip_list" + import importlib.metadata + import sys + + print("Checking for expected packages from extras and dependency groups...") + print("Installed packages:") + installed_packages = {} + for dist in sorted(importlib.metadata.Distribution.discover(), key=lambda d: d.name): + print(f"{dist.name}: {dist.version}") + installed_packages[dist.name] = dist # Check for extras packages - if ! echo "$pip_list" | grep -i "colorama"; then - echo "::error title=Test Failure::colorama (from colors extra) not found in pip list" - exit 1 - fi - if ! echo "$pip_list" | grep -i "tomli"; then - echo "::error title=Test Failure::tomli (from serialization extra) not found in pip list" - exit 1 - fi + if "colorama" not in installed_packages: + sys.exit("::error title=Test Failure::colorama (from colors extra) not installed") + if "tomli" not in installed_packages: + sys.exit("::error title=Test Failure::tomli (from serialization extra) not installed") # Check for dependency group packages - if ! echo "$pip_list" | grep -i "pytest"; then - echo "::error title=Test Failure::pytest (from dev group) not found in pip list" - exit 1 - fi - if ! echo "$pip_list" | grep -i "markdown"; then - echo "::error title=Test Failure::markdown (from docs group) not found in pip list" - exit 1 - fi - if ! echo "$pip_list" | grep -i "click"; then - echo "::error title=Test Failure::click (from utils group) not found in pip list" - exit 1 - fi + if "pytest" not in installed_packages: + sys.exit("::error title=Test Failure::pytest (from dev group) not installed") + if "markdown" not in installed_packages: + sys.exit("::error title=Test Failure::markdown (from docs group) not installed") + if "click" not in installed_packages: + sys.exit("::error title=Test Failure::click (from utils group) not installed") - echo "All expected packages found!" + print("All expected packages found!") working-directory: ${{ github.workspace }}/.github/test_projects/extras-and-dependency-groups - shell: bash + shell: poetry run python {0} test_analyze_project_cache_hit: From a98d7bb2721a210d84d07827566f3fab474df698 Mon Sep 17 00:00:00 2001 From: Brad Keryan Date: Mon, 12 Oct 2026 15:35:39 -0500 Subject: [PATCH 5/5] tests: Fix Markdown capitalization and print errors to stdout to avoid showing errors before installed packages --- .github/workflows/test_actions.yml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test_actions.yml b/.github/workflows/test_actions.yml index c4d8c95..2d51f05 100644 --- a/.github/workflows/test_actions.yml +++ b/.github/workflows/test_actions.yml @@ -389,17 +389,22 @@ jobs: # Check for extras packages if "colorama" not in installed_packages: - sys.exit("::error title=Test Failure::colorama (from colors extra) not installed") + print("::error title=Test Failure::colorama (from colors extra) not installed") + sys.exit(1) if "tomli" not in installed_packages: - sys.exit("::error title=Test Failure::tomli (from serialization extra) not installed") + print("::error title=Test Failure::tomli (from serialization extra) not installed") + sys.exit(1) # Check for dependency group packages if "pytest" not in installed_packages: - sys.exit("::error title=Test Failure::pytest (from dev group) not installed") - if "markdown" not in installed_packages: - sys.exit("::error title=Test Failure::markdown (from docs group) not installed") + print("::error title=Test Failure::pytest (from dev group) not installed") + sys.exit(1) + if "Markdown" not in installed_packages: + print("::error title=Test Failure::markdown (from docs group) not installed") + sys.exit(1) if "click" not in installed_packages: - sys.exit("::error title=Test Failure::click (from utils group) not installed") + print("::error title=Test Failure::click (from utils group) not installed") + sys.exit(1) print("All expected packages found!") working-directory: ${{ github.workspace }}/.github/test_projects/extras-and-dependency-groups