Skip to content

Commit 5642bd6

Browse files
update test-python.yml for .tool-versions
1 parent d5a4d05 commit 5642bd6

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

.github/workflows/test-python.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,36 @@ jobs:
245245
- name: Run simple code
246246
run: python -c 'import math; print(math.factorial(5))'
247247

248+
setup-versions-from-.tool-versions-file:
249+
name: Setup ${{ matrix.python }} ${{ matrix.os }} .tool-versions file
250+
runs-on: ${{ matrix.os }}
251+
strategy:
252+
fail-fast: false
253+
matrix:
254+
os:
255+
[
256+
macos-latest,
257+
windows-latest,
258+
ubuntu-20.04,
259+
ubuntu-22.04,
260+
macos-13,
261+
ubuntu-latest
262+
]
263+
python: [3.13.0, 3.14-dev, pypy3.7-v7.3.3, graalpy-24.1.2]
264+
steps:
265+
- name: Checkout
266+
uses: actions/checkout@v4
267+
268+
- name: build-tool-versions-file ${{ matrix.python }}
269+
run: |
270+
echo "python ${{ matrix.python }}" > .tool-versions
271+
272+
- name: setup-python using .tool-versions ${{ matrix.python }}
273+
id: setup-python-tool-versions
274+
uses: ./
275+
with:
276+
python-version-file: .tool-versions
277+
248278
setup-pre-release-version-from-manifest:
249279
name: Setup 3.14.0-alpha.1 ${{ matrix.os }}
250280
runs-on: ${{ matrix.os }}

0 commit comments

Comments
 (0)