Skip to content

Commit 058a57a

Browse files
committed
tests: Redo version parsing
1 parent 6986d4e commit 058a57a

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

.github/workflows/test_actions.yml

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
strategy:
1212
matrix:
1313
os: [windows-latest, ubuntu-latest, macos-latest]
14-
python-version: [3.9, '3.10', 3.11, 3.12, 3.13, 3.13t, 3.14.0-rc.3, pypy3.10, pypy3.11]
14+
python-version: [3.9, '3.10', 3.11, 3.12, 3.13, 3.13t, 3.14.0-rc.3, 3.14.0t-rc.3, pypy3.10, pypy3.11]
1515
steps:
1616
- name: Check out repo
1717
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
@@ -21,9 +21,10 @@ jobs:
2121
python-version: ${{ matrix.python-version }}
2222
- name: Check Python version
2323
run: |
24-
import sys, sysconfig
25-
version = sys.version_info[:2]
26-
expected_version = tuple(map(int, "${{ matrix.python-version }}".removeprefix("pypy").removesuffix("t").split(".")[:2]))
24+
import sys, sysconfig, re
25+
match = re.search(r"(\d+)\.(\d+)(?:\.(\d+))?", "${{ matrix.python-version }}")
26+
expected_version = tuple(int(g) for g in match.groups() if g is not None)
27+
version = sys.version_info[:len(expected_version)]
2728
if version != expected_version:
2829
print(f"::error title=Test Failure::The Python version does not match. Got {version}, expected {expected_version}.")
2930
sys.exit(1)
@@ -45,7 +46,7 @@ jobs:
4546
strategy:
4647
matrix:
4748
os: [windows-latest, ubuntu-latest, macos-latest]
48-
python-version: [3.9, '3.10', 3.11, 3.12, 3.13, 3.14.0-rc.3, pypy3.10, pypy3.11]
49+
python-version: [3.9, '3.10', 3.11, 3.12, 3.13, 3.14.0-rc.3, 3.14.0t-rc.3, pypy3.10, pypy3.11]
4950
steps:
5051
- name: Check out repo
5152
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
@@ -72,7 +73,7 @@ jobs:
7273
strategy:
7374
matrix:
7475
os: [windows-latest, ubuntu-latest, macos-latest]
75-
python-version: [3.9, '3.10', 3.11, 3.12, 3.13, 3.14.0-rc.3, pypy3.10, pypy3.11]
76+
python-version: [3.9, '3.10', 3.11, 3.12, 3.13, 3.14.0-rc.3, 3.14.0t-rc.3, pypy3.10, pypy3.11]
7677
steps:
7778
- name: Check out repo
7879
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
@@ -104,7 +105,7 @@ jobs:
104105
strategy:
105106
matrix:
106107
os: [windows-latest, ubuntu-latest, macos-latest]
107-
python-version: [3.9, '3.10', 3.11, 3.12, 3.13, 3.14.0-rc.3, pypy3.10, pypy3.11]
108+
python-version: [3.9, '3.10', 3.11, 3.12, 3.13, 3.14.0-rc.3, 3.14.0t-rc.3, pypy3.10, pypy3.11]
108109
steps:
109110
- name: Check out repo
110111
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
@@ -219,7 +220,7 @@ jobs:
219220
fail-fast: false # If there are failures, sometimes it is instructive to see which combinations passed
220221
matrix:
221222
os: [windows-latest, ubuntu-latest, macos-latest]
222-
python-version: [3.9, '3.10', 3.11, 3.12, 3.13, 3.14.0-rc.3, pypy3.10, pypy3.11]
223+
python-version: [3.9, '3.10', 3.11, 3.12, 3.13, 3.14.0-rc.3, 3.14.0t-rc.3, pypy3.10, pypy3.11]
223224
steps:
224225
- name: Check out repo
225226
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
@@ -318,7 +319,7 @@ jobs:
318319
strategy:
319320
matrix:
320321
os: [windows-latest, ubuntu-latest, macos-latest]
321-
python-version: [3.9, '3.10', 3.11, 3.12, 3.13, 3.14.0-rc.3, pypy3.10, pypy3.11]
322+
python-version: [3.9, '3.10', 3.11, 3.12, 3.13, 3.14.0-rc.3, 3.14.0t-rc.3, pypy3.10, pypy3.11]
322323
steps:
323324
- name: Check out repo
324325
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
@@ -376,7 +377,7 @@ jobs:
376377
strategy:
377378
matrix:
378379
os: [windows-latest, ubuntu-latest, macos-latest]
379-
python-version: [3.9, '3.10', 3.11, 3.12, 3.13, 3.14.0-rc.3, pypy3.10, pypy3.11]
380+
python-version: [3.9, '3.10', 3.11, 3.12, 3.13, 3.14.0-rc.3, 3.14.0t-rc.3, pypy3.10, pypy3.11]
380381
steps:
381382
- name: Check out repo
382383
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0

0 commit comments

Comments
 (0)