Skip to content

Commit dbe1a42

Browse files
authored
tests: Add test coverage of Python 3.14.0rc3 (#43)
* tests: Add 3.14 and 3.14t * tests: Use 3.14rc3 * tests: 3.14.0-rc.3 * tests: Remove 3.14t for now * tests: Remap 3.14.0-rc.3 to 3.14.0rc3 * tests: Ignore .0-rc.3 * tests: Redo version parsing * tests: Try 3.14t-dev setup-python has limited support for specifying freethreading in the version string, and basically supports \d+.\d+(\.d+)?t and \d+.\d+t-dev * tests: Fix free-threading check
1 parent 47527f6 commit dbe1a42

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

.github/workflows/test_actions.yml

Lines changed: 12 additions & 11 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, 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.14t-dev, 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(".")))
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)
@@ -33,7 +34,7 @@ jobs:
3334
print(f"::error title=Test Failure::The Python implementation does not match. Got {implementation}, expected {expected_implementation}.")
3435
sys.exit(1)
3536
threading = "free-threading" if sysconfig.get_config_var("Py_GIL_DISABLED") else "GIL"
36-
expected_threading = "free-threading" if "${{ matrix.python-version }}".endswith("t") else "GIL"
37+
expected_threading = "free-threading" if "t" in "${{ matrix.python-version }}" else "GIL"
3738
if threading != expected_threading:
3839
print(f"::error title=Test Failure::The Python threading does not match. Got {threading}, expected {expected_threading}.")
3940
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, pypy3.10, pypy3.11]
49+
python-version: [3.9, '3.10', 3.11, 3.12, 3.13, 3.14.0-rc.3, 3.14t-dev, 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, pypy3.10, pypy3.11]
76+
python-version: [3.9, '3.10', 3.11, 3.12, 3.13, 3.14.0-rc.3, 3.14t-dev, 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, pypy3.10, pypy3.11]
108+
python-version: [3.9, '3.10', 3.11, 3.12, 3.13, 3.14.0-rc.3, 3.14t-dev, 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, pypy3.10, pypy3.11]
223+
python-version: [3.9, '3.10', 3.11, 3.12, 3.13, 3.14.0-rc.3, 3.14t-dev, 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, pypy3.10, pypy3.11]
322+
python-version: [3.9, '3.10', 3.11, 3.12, 3.13, 3.14.0-rc.3, 3.14t-dev, 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, pypy3.10, pypy3.11]
380+
python-version: [3.9, '3.10', 3.11, 3.12, 3.13, 3.14.0-rc.3, 3.14t-dev, pypy3.10, pypy3.11]
380381
steps:
381382
- name: Check out repo
382383
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0

0 commit comments

Comments
 (0)