From d3614793c0d0eaff07bedcbfb7d3613097ed39b9 Mon Sep 17 00:00:00 2001 From: MaksimZhukov Date: Tue, 15 Dec 2020 17:31:08 +0300 Subject: [PATCH] Add a new workflow to test Python versions --- .github/workflows/test-python-version.yml | 34 +++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/test-python-version.yml diff --git a/.github/workflows/test-python-version.yml b/.github/workflows/test-python-version.yml new file mode 100644 index 0000000..6c0de43 --- /dev/null +++ b/.github/workflows/test-python-version.yml @@ -0,0 +1,34 @@ +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-18.04, ubuntu-20.04] + 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))' \ No newline at end of file