Skip to content

Commit d8cdc2c

Browse files
authored
Try consolidating CPython and PyPy Python setup steps
1 parent 5b1fa21 commit d8cdc2c

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -142,17 +142,11 @@ jobs:
142142
- name: Enable Problem Matchers
143143
run: |
144144
echo "::add-matcher::.github/local-problem-matchers.json"
145-
- name: Set up ${{ matrix.python.name }} (if CPython)
146-
if: ${{ job.container == '' && matrix.python.implementation == 'cpython'}}
145+
- name: Set up ${{ matrix.python.name }}
146+
if: ${{ job.container == '' }}
147147
uses: actions/setup-python@v2
148148
with:
149-
python-version: '${{ matrix.python.action }}.0-alpha - ${{ matrix.python.action }}.X'
150-
architecture: x64
151-
- name: Set up ${{ matrix.python.name }} (if PyPy)
152-
if: ${{ job.container == '' && matrix.python.implementation == 'pypy'}}
153-
uses: actions/setup-python@v2
154-
with:
155-
python-version: '${{ matrix.python.action }}'
149+
python-version: ${{ fromJSON(format('["{0}", "{1}"]', format('{0}.0-alpha - {0}.X', matrix.python), matrix.python))[startsWith(matrix.python, 'pypy')] }}
156150
architecture: x64
157151
- name: Report Python information
158152
shell: bash

0 commit comments

Comments
 (0)