8000 Merge pull request #71 from actions/v-mazhuk/add-test-workflow · mxschmitt/python-versions@30a06d5 · GitHub
[go: up one dir, main page]

Skip to content

Commit 30a06d5

Browse files
authored
Merge pull request actions#71 from actions/v-mazhuk/add-test-workflow
Add a new workflow to test Python versions
2 parents fab0879 + d361479 commit 30a06d5

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Test Python version
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
version:
6+
description: 'Python version to build'
7+
required: true
8+
architecture:
9+
description: 'The target architecture (x86, x64) of the Python'
10+
required: false
11+
default: 'x64'
12+
13+
jobs:
14+
test-python:
15+
name: Test Python ${{ github.event.inputs.version }} ${{ matrix.os }}
16+
runs-on: ${{ matrix.os }}
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
os: [macos-latest, windows-latest, ubuntu-18.04, ubuntu-20.04]
21+
steps:
22+
- name: Setup Python ${{ github.event.inputs.version }}
23+
uses: actions/setup-python@main
24+
with:
25+
python-version: ${{ github.event.inputs.version }}
26+
architecture: ${{ github.event.inputs.architecture }}
27+
28+
- name: Validate version
29+
run: |
30+
python --version
31+
shell: pwsh
32+
33+
- name: Run simple code
34+
run: python -c 'import math; print(math.factorial(5))'

0 commit comments

Comments
 (0)
0