Test Python version #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test Python version | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
description: 'Python version to build' | |
required: true | |
architecture: | |
description: 'The target architecture (x86, x64) of the Python' | |
required: false | |
default: 'x64' | |
jobs: | |
test-python: | |
name: Test Python ${{ github.event.inputs.version }} ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [macos-latest, windows-latest, ubuntu-20.04, ubuntu-22.04, ubuntu-24.04, macos-13] | |
steps: | |
- name: Setup Python ${{ github.event.inputs.version }} | |
uses: actions/setup-python@main | |
with: | |
python-version: ${{ github.event.inputs.version }} | |
architecture: ${{ github.event.inputs.architecture }} | |
- name: Validate version | |
run: | | |
python --version | |
shell: pwsh | |
- name: Run simple code | |
run: python -c 'import math; print(math.factorial(5))' |