Skip to content

Commit 4630efd

Browse files
authored
ci: run tests on all active Python versions (#878)
Based on the current state of https://devguide.python.org/versions/.
1 parent fd12dff commit 4630efd

2 files changed

Lines changed: 11 additions & 10 deletions

File tree

.github/workflows/unit-tests.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
3939
strategy:
4040
matrix:
41-
python-version: ['3.10', '3.13']
41+
python-version: ['3.10', '3.11', '3.12', '3.13', '3.14']
4242
steps:
4343
- name: Checkout code
4444
uses: actions/checkout@v6
@@ -56,9 +56,9 @@ jobs:
5656
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
5757
5858
59-
# Coverage comparison for PRs (only on Python 3.13 to avoid duplicate work)
59+
# Coverage comparison for PRs (only on Python 3.14 to avoid duplicate work)
6060
- name: Checkout Base Branch
61-
if: github.event_name == 'pull_request' && matrix.python-version == '3.13'
61+
if: github.event_name == 'pull_request' && matrix.python-version == '3.14'
6262
uses: actions/checkout@v4
6363
with:
6464
ref: ${{ github.event.pull_request.base.ref || 'main' }}
@@ -68,33 +68,33 @@ jobs:
6868
run: uv sync --locked
6969

7070
- name: Run coverage (Base)
71-
if: github.event_name == 'pull_request' && matrix.python-version == '3.13'
71+
if: github.event_name == 'pull_request' && matrix.python-version == '3.14'
7272
run: |
7373
uv run pytest --cov=a2a --cov-report=json --cov-report=html:coverage
7474
mv coverage.json /tmp/coverage-base.json
7575
7676
- name: Checkout PR Branch (Restore)
77-
if: github.event_name == 'pull_request' && matrix.python-version == '3.13'
77+
if: github.event_name == 'pull_request' && matrix.python-version == '3.14'
7878
uses: actions/checkout@v4
7979
with:
8080
clean: true
8181

8282
- name: Run coverage (PR)
83-
if: github.event_name == 'pull_request' && matrix.python-version == '3.13'
83+
if: github.event_name == 'pull_request' && matrix.python-version == '3.14'
8484
run: |
8585
uv run pytest --cov=a2a --cov-report=json --cov-report=html:coverage --cov-report=term --cov-fail-under=88
8686
mv coverage.json coverage-pr.json
8787
cp /tmp/coverage-base.json coverage-base.json
8888
8989
- name: Save Metadata
90-
if: github.event_name == 'pull_request' && matrix.python-version == '3.13'
90+
if: github.event_name == 'pull_request' && matrix.python-version == '3.14'
9191
run: |
9292
echo ${{ github.event.number }} > ./PR_NUMBER
9393
echo ${{ github.event.pull_request.base.ref || 'main' }} > ./BASE_BRANCH
9494
9595
- name: Upload Coverage Artifacts
9696
uses: actions/upload-artifact@v4
97-
if: github.event_name == 'pull_request' && matrix.python-version == '3.13'
97+
if: github.event_name == 'pull_request' && matrix.python-version == '3.14'
9898
with:
9999
name: coverage-data
100100
path: |
@@ -107,12 +107,12 @@ jobs:
107107

108108
# Run standard tests (for matrix items that didn't run coverage PR)
109109
- name: Run tests (Standard)
110-
if: matrix.python-version != '3.13' || github.event_name != 'pull_request'
110+
if: matrix.python-version != '3.14' || github.event_name != 'pull_request'
111111
run: uv run pytest --cov=a2a --cov-report term --cov-fail-under=88
112112

113113
- name: Upload Artifact (base)
114114
uses: actions/upload-artifact@v4
115-
if: github.event_name != 'pull_request' && matrix.python-version == '3.13'
115+
if: github.event_name != 'pull_request' && matrix.python-version == '3.14'
116116
with:
117117
name: coverage-report
118118
path: coverage

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ classifiers = [
2525
"Programming Language :: Python :: 3.11",
2626
"Programming Language :: Python :: 3.12",
2727
"Programming Language :: Python :: 3.13",
28+
"Programming Language :: Python :: 3.14",
2829
"Operating System :: OS Independent",
2930
"Topic :: Software Development :: Libraries :: Python Modules",
3031
"License :: OSI Approved :: Apache Software License",

0 commit comments

Comments
 (0)