@@ -182,13 +182,11 @@ jobs:
182182 # lsp_extract_file: ''
183183 # extra_name: ', with non-IFS LSP'
184184
185- # ***REMEMBER*** to remove the 3.14 line once windows+cffi works again
186185 continue-on-error : >-
187186 ${{
188187 (
189188 endsWith(matrix.python, '-dev')
190189 || endsWith(matrix.python, '-nightly')
191- || matrix.python == '3.14'
192190 )
193191 && true
194192 || false
@@ -202,18 +200,11 @@ jobs:
202200 - name : Setup python
203201 uses : actions/setup-python@v5
204202 with :
205- # This allows the matrix to specify just the major.minor version while still
206- # expanding it to get the latest patch version including alpha releases.
207- # This avoids the need to update for each new alpha, beta, release candidate,
208- # and then finally an actual release version. actions/setup-python doesn't
209- # support this for PyPy presently so we get no help there.
210- #
211- # 'CPython' -> '3.9.0-alpha - 3.9.X'
212- # 'PyPy' -> 'pypy-3.9'
213- python-version : ${{ fromJSON(format('["{0}", "{1}"]', format('{0}.0-alpha - {0}.X', matrix.python), matrix.python))[startsWith(matrix.python, 'pypy')] }}
203+ python-version : ' ${{ matrix.python }}'
214204 architecture : ' ${{ matrix.arch }}'
215205 cache : pip
216206 cache-dependency-path : test-requirements.txt
207+ allow-prereleases : true
217208 - name : Run tests
218209 run : ./ci.sh
219210 shell : bash
@@ -276,9 +267,10 @@ jobs:
276267 - name : Setup python
277268 uses : actions/setup-python@v5
278269 with :
279- python-version : ${{ fromJSON(format('["{0}", "{1}"]', format('{0}.0-alpha - {0}.X', matrix.python), matrix.python))[startsWith(matrix.python, 'pypy')] }}
270+ python-version : ' ${{ matrix.python }} '
280271 cache : pip
281272 cache-dependency-path : test-requirements.txt
273+ allow-prereleases : true
282274 - name : Check Formatting
283275 if : matrix.check_formatting == '1'
284276 run :
@@ -328,9 +320,10 @@ jobs:
328320 - name : Setup python
329321 uses : actions/setup-python@v5
330322 with :
331- python-version : ${{ fromJSON(format('["{0}", "{1}"]', format('{0}.0-alpha - {0}.X', matrix.python), matrix.python))[startsWith(matrix.python, 'pypy')] }}
323+ python-version : ' ${{ matrix.python }} '
332324 cache : pip
333325 cache-dependency-path : test-requirements.txt
326+ allow-prereleases : true
334327 - name : Run tests
335328 run : ./ci.sh
336329 - if : always()
@@ -356,19 +349,29 @@ jobs:
356349 # `nodejs` for pyright (`node-env` pulls in nodejs but that takes a while and can time out the test).
357350 # `perl` for a platform independent `sed -i` alternative
358351 run : apk update && apk add python3-dev bash nodejs perl
352+
359353 - name : Retrieve the project source from an sdist inside the GHA artifact
360354 # must be after `apk add` because it relies on `bash` existing
361355 uses : re-actors/checkout-python-sdist@release/v2
362356 with :
363357 source-tarball-name : ${{ needs.build.outputs.sdist-artifact-name }}
364358 workflow-artifact-name : ${{ env.dists-artifact-name }}
359+
365360 - name : Enter virtual environment
366361 run : python -m venv .venv
362+
367363 - name : Run tests
368364 run : source .venv/bin/activate && ./ci.sh
365+
369366 - name : Get Python version for codecov flag
370367 id : get-version
371- run : echo "version=$(python -V | cut -d' ' -f2 | cut -d'.' -f1,2)" >> "${GITHUB_OUTPUT}"
368+ shell : python
369+ run : |
370+ import sys, os
371+ with open(os.environ["GITHUB_OUTPUT"], "a") as f:
372+ f.write("version=" + ".".join(map(str, sys.version_info[:2])))
373+ f.write("\n")
374+
372375 - if : always()
373376 uses : codecov/codecov-action@v3
374377 with :
@@ -425,11 +428,14 @@ jobs:
425428 - name : import & run module
426429 run : coverage run -m tests.cython.run_test_cython
427430
428- - name : get Python version for codecov flag
431+ - name : Get Python version for codecov flag
429432 id : get-version
430- run : >-
431- echo "version=$(python -V | cut -d' ' -f2 | cut -d'.' -f1,2)"
432- >> "${GITHUB_OUTPUT}"
433+ shell : python
434+ run : |
435+ import sys, os
436+ with open(os.environ["GITHUB_OUTPUT"], "a") as f:
437+ f.write("version=" + ".".join(map(str, sys.version_info[:2])))
438+ f.write("\n")
433439
434440 - run : |
435441 coverage combine
0 commit comments