Skip to content

Commit 340c77e

Browse files
Use build-and-inspect Python versions output for test matrix
Use the supported_python_classifiers_json_array output from build-and-inspect-python-package instead of hardcoding Python versions. This ensures the CI automatically tests all Python versions declared in the package classifiers. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 0865876 commit 340c77e

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

.github/workflows/test.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,16 @@ jobs:
99
id-token: write
1010
attestations: write
1111
contents: read
12+
outputs:
13+
python-versions: ${{ steps.baipp.outputs.supported_python_classifiers_json_array }}
1214

1315
steps:
1416
- uses: actions/checkout@v4
1517
with:
1618
fetch-depth: 0
1719

1820
- name: Build and inspect package
21+
id: baipp
1922
uses: hynek/build-and-inspect-python-package@v2
2023
with:
2124
attest-build-provenance-github: true
@@ -30,7 +33,7 @@ jobs:
3033
strategy:
3134
fail-fast: false
3235
matrix:
33-
python: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
36+
python: ${{ fromJSON(needs.build-and-inspect.outputs.python-versions) }}
3437
os: [ubuntu-latest, windows-latest]
3538

3639
steps:

0 commit comments

Comments
 (0)