Skip to content

Commit c51b791

Browse files
authored
Update ci.yml
1 parent d8cdc2c commit c51b791

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,15 @@ jobs:
146146
if: ${{ job.container == '' }}
147147
uses: actions/setup-python@v2
148148
with:
149-
python-version: ${{ fromJSON(format('["{0}", "{1}"]', format('{0}.0-alpha - {0}.X', matrix.python), matrix.python))[startsWith(matrix.python, 'pypy')] }}
149+
# This allows the matrix to specify just the major.minor version while still
150+
# expanding it to get the latest patch version including alpha releases.
151+
# This avoids the need to update for each new alpha, beta, release candidate,
152+
# and then finally an actual release version. actions/setup-python doesn't
153+
# support this for PyPy presently so we get no help there.
154+
#
155+
# CPython -> 3.9.0-alpha - 3.9.X
156+
# PyPy -> pypy-3.7
157+
python-version: ${{ fromJSON(format('["{0}", "{1}"]', format('{0}.0-alpha - {0}.X', matrix.python.action), matrix.python.action))[startsWith(matrix.python.action, 'pypy')] }}
150158
architecture: x64
151159
- name: Report Python information
152160
shell: bash

0 commit comments

Comments
 (0)