2020-12-17 10:03:54 -05:00
|
|
|
name: Validate Python e2e
|
2022-12-22 04:17:13 -05:00
|
|
|
|
2022-06-08 08:58:05 -04:00
|
|
|
on:
|
2020-04-29 13:57:02 -04:00
|
|
|
push:
|
2020-05-01 12:52:58 -04:00
|
|
|
branches:
|
2020-07-14 10:04:57 -04:00
|
|
|
- main
|
2020-05-01 12:52:58 -04:00
|
|
|
paths-ignore:
|
|
|
|
- '**.md'
|
2020-04-29 13:57:02 -04:00
|
|
|
pull_request:
|
2020-05-01 12:52:58 -04:00
|
|
|
paths-ignore:
|
|
|
|
- '**.md'
|
2020-04-29 13:57:02 -04:00
|
|
|
schedule:
|
2020-12-17 10:03:54 -05:00
|
|
|
- cron: 30 3 * * *
|
2022-06-02 10:37:57 -04:00
|
|
|
workflow_dispatch:
|
2020-04-29 13:57:02 -04:00
|
|
|
|
|
|
|
jobs:
|
2022-06-02 10:37:57 -04:00
|
|
|
setup-versions-from-manifest:
|
|
|
|
name: Setup ${{ matrix.python }} ${{ matrix.os }}
|
2020-04-29 13:57:02 -04:00
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2024-12-19 13:03:44 -05:00
|
|
|
os:
|
|
|
|
[
|
|
|
|
macos-latest,
|
|
|
|
windows-latest,
|
|
|
|
ubuntu-20.04,
|
|
|
|
ubuntu-22.04,
|
|
|
|
macos-13,
|
|
|
|
ubuntu-latest
|
|
|
|
]
|
|
|
|
python: [3.9.13, 3.10.11, 3.11.9, 3.12.3, 3.13.0]
|
2020-04-29 13:57:02 -04:00
|
|
|
steps:
|
2023-03-09 05:44:56 -05:00
|
|
|
- name: Checkout
|
2023-11-08 05:16:06 -05:00
|
|
|
uses: actions/checkout@v4
|
2023-03-09 05:44:56 -05:00
|
|
|
|
|
|
|
- name: setup-python ${{ matrix.python }}
|
|
|
|
id: setup-python
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
python-version: ${{ matrix.python }}
|
|
|
|
|
|
|
|
- name: Check python-path
|
|
|
|
run: ./__tests__/check-python-path.sh '${{ steps.setup-python.outputs.python-path }}'
|
|
|
|
shell: bash
|
|
|
|
|
|
|
|
- name: Validate version
|
|
|
|
run: |
|
|
|
|
$pythonVersion = (python --version)
|
|
|
|
if ("Python ${{ matrix.python }}" -ne "$pythonVersion"){
|
|
|
|
Write-Host "The current version is $pythonVersion; expected version is ${{ matrix.python }}"
|
|
|
|
exit 1
|
|
|
|
}
|
|
|
|
$pythonVersion
|
|
|
|
shell: pwsh
|
|
|
|
|
|
|
|
- name: Run simple code
|
|
|
|
run: python -c 'import math; print(math.factorial(5))'
|
2020-04-29 13:57:02 -04:00
|
|
|
|
2022-06-02 10:37:57 -04:00
|
|
|
setup-versions-from-file:
|
|
|
|
name: Setup ${{ matrix.python }} ${{ matrix.os }} version file
|
2020-04-29 13:57:02 -04:00
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2024-12-19 13:03:44 -05:00
|
|
|
os:
|
|
|
|
[
|
|
|
|
macos-latest,
|
|
|
|
windows-latest,
|
|
|
|
ubuntu-20.04,
|
|
|
|
ubuntu-22.04,
|
|
|
|
macos-13,
|
|
|
|
ubuntu-latest
|
|
|
|
]
|
|
|
|
python: [3.9.13, 3.10.11, 3.11.9, 3.12.3, 3.13.0]
|
2020-04-29 13:57:02 -04:00
|
|
|
steps:
|
2023-03-09 05:44:56 -05:00
|
|
|
- name: Checkout
|
2023-11-08 05:16:06 -05:00
|
|
|
uses: actions/checkout@v4
|
2023-03-09 05:44:56 -05:00
|
|
|
|
|
|
|
- name: build-version-file ${{ matrix.python }}
|
|
|
|
run: echo ${{ matrix.python }} > .python-version
|
|
|
|
|
|
|
|
- name: setup-python ${{ matrix.python }}
|
|
|
|
id: setup-python
|
|
|
|
uses: ./
|
|
|
|
with:
|
2023-06-28 16:02:44 -04:00
|
|
|
python-version-file: .python-version
|
|
|
|
|
|
|
|
- name: Check python-path
|
|
|
|
run: ./__tests__/check-python-path.sh '${{ steps.setup-python.outputs.python-path }}'
|
|
|
|
shell: bash
|
|
|
|
|
|
|
|
- name: Validate version
|
|
|
|
run: |
|
|
|
|
$pythonVersion = (python --version)
|
|
|
|
if ("Python ${{ matrix.python }}" -ne "$pythonVersion"){
|
|
|
|
Write-Host "The current version is $pythonVersion; expected version is ${{ matrix.python }}"
|
|
|
|
exit 1
|
|
|
|
}
|
|
|
|
$pythonVersion
|
|
|
|
shell: pwsh
|
|
|
|
|
|
|
|
- name: Run simple code
|
|
|
|
run: python -c 'import math; print(math.factorial(5))'
|
|
|
|
|
|
|
|
setup-versions-from-file-without-parameter:
|
|
|
|
name: Setup ${{ matrix.python }} ${{ matrix.os }} version file without parameter
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2024-12-19 13:03:44 -05:00
|
|
|
os:
|
|
|
|
[
|
|
|
|
macos-latest,
|
|
|
|
windows-latest,
|
|
|
|
ubuntu-20.04,
|
|
|
|
ubuntu-22.04,
|
|
|
|
macos-13,
|
|
|
|
ubuntu-latest
|
|
|
|
]
|
|
|
|
python: [3.9.13, 3.10.11, 3.11.9, 3.12.3, 3.13.0]
|
2023-06-28 16:02:44 -04:00
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2023-11-08 05:16:06 -05:00
|
|
|
uses: actions/checkout@v4
|
2023-06-28 16:02:44 -04:00
|
|
|
|
|
|
|
- name: build-version-file ${{ matrix.python }}
|
|
|
|
run: echo ${{ matrix.python }} > .python-version
|
|
|
|
|
|
|
|
- name: setup-python ${{ matrix.python }}
|
|
|
|
id: setup-python
|
|
|
|
uses: ./
|
|
|
|
|
|
|
|
- name: Check python-path
|
|
|
|
run: ./__tests__/check-python-path.sh '${{ steps.setup-python.outputs.python-path }}'
|
|
|
|
shell: bash
|
|
|
|
|
|
|
|
- name: Validate version
|
|
|
|
run: |
|
|
|
|
$pythonVersion = (python --version)
|
|
|
|
if ("Python ${{ matrix.python }}" -ne "$pythonVersion"){
|
|
|
|
Write-Host "The current version is $pythonVersion; expected version is ${{ matrix.python }}"
|
|
|
|
exit 1
|
|
|
|
}
|
|
|
|
$pythonVersion
|
|
|
|
shell: pwsh
|
|
|
|
|
|
|
|
- name: Run simple code
|
|
|
|
run: python -c 'import math; print(math.factorial(5))'
|
|
|
|
|
|
|
|
setup-versions-from-standard-pyproject-file:
|
|
|
|
name: Setup ${{ matrix.python }} ${{ matrix.os }} standard pyproject file
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2024-12-19 13:03:44 -05:00
|
|
|
os:
|
|
|
|
[
|
|
|
|
macos-latest,
|
|
|
|
windows-latest,
|
|
|
|
ubuntu-20.04,
|
|
|
|
ubuntu-22.04,
|
|
|
|
macos-13,
|
|
|
|
ubuntu-latest
|
|
|
|
]
|
|
|
|
python: [3.9.13, 3.10.11, 3.11.9, '==3.12.3', 3.13.0]
|
2023-06-28 16:02:44 -04:00
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2023-11-08 05:16:06 -05:00
|
|
|
uses: actions/checkout@v4
|
2023-06-28 16:02:44 -04:00
|
|
|
|
|
|
|
- name: build-version-file ${{ matrix.python }}
|
|
|
|
run: |
|
|
|
|
echo '[project]
|
|
|
|
requires-python = "${{ matrix.python }}"
|
|
|
|
' > pyproject.toml
|
|
|
|
|
|
|
|
- name: setup-python ${{ matrix.python }}
|
|
|
|
id: setup-python
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
python-version-file: pyproject.toml
|
|
|
|
|
|
|
|
- name: Check python-path
|
|
|
|
run: ./__tests__/check-python-path.sh '${{ steps.setup-python.outputs.python-path }}'
|
|
|
|
shell: bash
|
|
|
|
|
|
|
|
- name: Validate version
|
|
|
|
run: |
|
|
|
|
$pythonVersion = (python --version)
|
2023-09-07 09:45:09 -04:00
|
|
|
if ("Python ${{ matrix.python }}".replace("==", "") -ne "$pythonVersion"){
|
2023-06-28 16:02:44 -04:00
|
|
|
Write-Host "The current version is $pythonVersion; expected version is ${{ matrix.python }}"
|
|
|
|
exit 1
|
|
|
|
}
|
|
|
|
$pythonVersion
|
|
|
|
shell: pwsh
|
|
|
|
|
|
|
|
- name: Run simple code
|
|
|
|
run: python -c 'import math; print(math.factorial(5))'
|
|
|
|
|
|
|
|
setup-versions-from-poetry-pyproject-file:
|
|
|
|
name: Setup ${{ matrix.python }} ${{ matrix.os }} poetry pyproject file
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2024-12-19 13:03:44 -05:00
|
|
|
os:
|
|
|
|
[
|
|
|
|
macos-latest,
|
|
|
|
windows-latest,
|
|
|
|
ubuntu-20.04,
|
|
|
|
ubuntu-22.04,
|
|
|
|
macos-13,
|
|
|
|
ubuntu-latest
|
|
|
|
]
|
|
|
|
python: [3.9.13, 3.10.11, 3.11.9, 3.12.3, 3.13.0]
|
2023-06-28 16:02:44 -04:00
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2023-11-08 05:16:06 -05:00
|
|
|
uses: actions/checkout@v4
|
2023-06-28 16:02:44 -04:00
|
|
|
|
|
|
|
- name: build-version-file ${{ matrix.python }}
|
|
|
|
run: |
|
|
|
|
echo '[tool.poetry.dependencies]
|
|
|
|
python = "${{ matrix.python }}"
|
|
|
|
' > pyproject.toml
|
|
|
|
|
|
|
|
- name: setup-python ${{ matrix.python }}
|
|
|
|
id: setup-python
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
python-version-file: pyproject.toml
|
2023-03-09 05:44:56 -05:00
|
|
|
|
|
|
|
- name: Check python-path
|
|
|
|
run: ./__tests__/check-python-path.sh '${{ steps.setup-python.outputs.python-path }}'
|
|
|
|
shell: bash
|
|
|
|
|
|
|
|
- name: Validate version
|
|
|
|
run: |
|
|
|
|
$pythonVersion = (python --version)
|
|
|
|
if ("Python ${{ matrix.python }}" -ne "$pythonVersion"){
|
|
|
|
Write-Host "The current version is $pythonVersion; expected version is ${{ matrix.python }}"
|
|
|
|
exit 1
|
|
|
|
}
|
|
|
|
$pythonVersion
|
|
|
|
shell: pwsh
|
|
|
|
|
|
|
|
- name: Run simple code
|
|
|
|
run: python -c 'import math; print(math.factorial(5))'
|
2020-07-17 05:58:03 -04:00
|
|
|
|
|
|
|
setup-pre-release-version-from-manifest:
|
2024-10-24 09:38:22 -04:00
|
|
|
name: Setup 3.14.0-alpha.1 ${{ matrix.os }}
|
2020-07-17 05:58:03 -04:00
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2024-12-19 13:03:44 -05:00
|
|
|
os:
|
|
|
|
[
|
|
|
|
macos-latest,
|
|
|
|
windows-latest,
|
|
|
|
ubuntu-20.04,
|
|
|
|
ubuntu-22.04,
|
|
|
|
macos-13,
|
|
|
|
ubuntu-latest
|
|
|
|
]
|
2020-07-17 05:58:03 -04:00
|
|
|
steps:
|
2023-03-09 05:44:56 -05:00
|
|
|
- name: Checkout
|
2023-11-08 05:16:06 -05:00
|
|
|
uses: actions/checkout@v4
|
2023-03-09 05:44:56 -05:00
|
|
|
|
2024-10-24 09:38:22 -04:00
|
|
|
- name: setup-python 3.14.0-alpha.1
|
2023-03-09 05:44:56 -05:00
|
|
|
id: setup-python
|
|
|
|
uses: ./
|
|
|
|
with:
|
2024-10-24 09:38:22 -04:00
|
|
|
python-version: '3.14.0-alpha.1'
|
2023-03-09 05:44:56 -05:00
|
|
|
|
|
|
|
- name: Check python-path
|
|
|
|
run: ./__tests__/check-python-path.sh '${{ steps.setup-python.outputs.python-path }}'
|
|
|
|
shell: bash
|
|
|
|
|
|
|
|
- name: Validate version
|
|
|
|
run: |
|
|
|
|
$pythonVersion = (python --version)
|
2024-10-24 09:38:22 -04:00
|
|
|
if ("Python 3.14.0a1" -ne "$pythonVersion"){
|
|
|
|
Write-Host "The current version is $pythonVersion; expected version is 3.14.0a1"
|
2023-03-09 05:44:56 -05:00
|
|
|
exit 1
|
|
|
|
}
|
|
|
|
$pythonVersion
|
|
|
|
shell: pwsh
|
|
|
|
|
|
|
|
- name: Run simple code
|
|
|
|
run: python -c 'import math; print(math.factorial(5))'
|
2020-12-07 16:59:14 -05:00
|
|
|
|
2022-06-08 08:58:05 -04:00
|
|
|
setup-dev-version:
|
2024-10-24 09:38:22 -04:00
|
|
|
name: Setup 3.14-dev ${{ matrix.os }}
|
2022-06-08 08:58:05 -04:00
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2024-10-24 09:38:22 -04:00
|
|
|
os: [macos-latest, windows-latest, ubuntu-latest, macos-13]
|
2022-06-08 08:58:05 -04:00
|
|
|
steps:
|
2023-03-09 05:44:56 -05:00
|
|
|
- name: Checkout
|
2023-11-08 05:16:06 -05:00
|
|
|
uses: actions/checkout@v4
|
2022-06-08 08:58:05 -04:00
|
|
|
|
2024-10-24 09:38:22 -04:00
|
|
|
- name: setup-python 3.14-dev
|
2023-03-09 05:44:56 -05:00
|
|
|
id: setup-python
|
|
|
|
uses: ./
|
|
|
|
with:
|
2024-10-24 09:38:22 -04:00
|
|
|
python-version: '3.14-dev'
|
2022-06-08 08:58:05 -04:00
|
|
|
|
2023-03-09 05:44:56 -05:00
|
|
|
- name: Check python-path
|
|
|
|
run: ./__tests__/check-python-path.sh '${{ steps.setup-python.outputs.python-path }}'
|
|
|
|
shell: bash
|
2022-06-08 08:58:05 -04:00
|
|
|
|
2023-03-09 05:44:56 -05:00
|
|
|
- name: Validate version
|
2024-10-24 09:38:22 -04:00
|
|
|
run: ${{ startsWith(steps.setup-python.outputs.python-version, '3.14.') }}
|
2023-03-09 05:44:56 -05:00
|
|
|
shell: bash
|
2022-06-08 08:58:05 -04:00
|
|
|
|
2023-03-09 05:44:56 -05:00
|
|
|
- name: Run simple code
|
|
|
|
run: python -c 'import math; print(math.factorial(5))'
|
2022-06-29 11:00:51 -04:00
|
|
|
|
2023-01-27 16:19:31 -05:00
|
|
|
setup-prerelease-version:
|
2024-10-24 09:38:22 -04:00
|
|
|
name: Setup 3.14 ${{ matrix.os }}
|
2023-01-27 16:19:31 -05:00
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2024-10-24 09:38:22 -04:00
|
|
|
os: [macos-latest, windows-latest, ubuntu-latest, macos-13]
|
2023-01-27 16:19:31 -05:00
|
|
|
steps:
|
2023-03-09 05:44:56 -05:00
|
|
|
- name: Checkout
|
2023-11-08 05:16:06 -05:00
|
|
|
uses: actions/checkout@v4
|
2023-01-27 16:19:31 -05:00
|
|
|
|
2024-10-24 09:38:22 -04:00
|
|
|
- name: setup-python 3.14
|
2023-03-09 05:44:56 -05:00
|
|
|
id: setup-python
|
|
|
|
uses: ./
|
|
|
|
with:
|
2024-10-24 09:38:22 -04:00
|
|
|
python-version: '3.14'
|
2023-03-09 05:44:56 -05:00
|
|
|
allow-prereleases: true
|
2023-01-27 16:19:31 -05:00
|
|
|
|
2023-03-09 05:44:56 -05:00
|
|
|
- name: Check python-path
|
|
|
|
run: ./__tests__/check-python-path.sh '${{ steps.setup-python.outputs.python-path }}'
|
|
|
|
shell: bash
|
2023-01-27 16:19:31 -05:00
|
|
|
|
2023-03-09 05:44:56 -05:00
|
|
|
- name: Validate version
|
2024-10-24 09:38:22 -04:00
|
|
|
run: ${{ startsWith(steps.setup-python.outputs.python-version, '3.14.') }}
|
2023-03-09 05:44:56 -05:00
|
|
|
shell: bash
|
2023-01-27 16:19:31 -05:00
|
|
|
|
2023-03-09 05:44:56 -05:00
|
|
|
- name: Run simple code
|
|
|
|
run: python -c 'import math; print(math.factorial(5))'
|
2023-01-27 16:19:31 -05:00
|
|
|
|
2022-06-29 11:00:51 -04:00
|
|
|
setup-versions-noenv:
|
|
|
|
name: Setup ${{ matrix.python }} ${{ matrix.os }} (noenv)
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2024-12-19 13:03:44 -05:00
|
|
|
os:
|
|
|
|
[
|
|
|
|
macos-latest,
|
|
|
|
windows-latest,
|
|
|
|
ubuntu-20.04,
|
|
|
|
ubuntu-22.04,
|
|
|
|
macos-13,
|
|
|
|
ubuntu-latest
|
|
|
|
]
|
|
|
|
python: ['3.9', '3.10', '3.11', '3.12', '3.13']
|
2022-06-29 11:00:51 -04:00
|
|
|
steps:
|
2023-03-09 05:44:56 -05:00
|
|
|
- name: Checkout
|
2023-11-08 05:16:06 -05:00
|
|
|
uses: actions/checkout@v4
|
2022-06-29 11:00:51 -04:00
|
|
|
|
2023-03-09 05:44:56 -05:00
|
|
|
- name: setup-python ${{ matrix.python }}
|
|
|
|
id: setup-python
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
python-version: ${{ matrix.python }}
|
|
|
|
update-environment: false
|
2022-06-29 11:00:51 -04:00
|
|
|
|
2023-03-09 05:44:56 -05:00
|
|
|
- name: Python version
|
|
|
|
run: ${{ steps.setup-python.outputs.python-path }} --version
|
2022-06-29 11:00:51 -04:00
|
|
|
|
2023-03-09 05:44:56 -05:00
|
|
|
- name: Run simple code
|
|
|
|
run: ${{ steps.setup-python.outputs.python-path }} -c 'import math; print(math.factorial(5))'
|
2022-07-25 10:54:04 -04:00
|
|
|
|
|
|
|
check-latest:
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2024-10-24 09:38:22 -04:00
|
|
|
os: [ubuntu-latest, windows-latest, macos-latest, macos-13]
|
2024-12-19 13:03:44 -05:00
|
|
|
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
|
2022-07-25 10:54:04 -04:00
|
|
|
steps:
|
2023-11-08 05:16:06 -05:00
|
|
|
- uses: actions/checkout@v4
|
2022-07-25 10:54:04 -04:00
|
|
|
- name: Setup Python and check latest
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
python-version: ${{ matrix.python-version }}
|
|
|
|
check-latest: true
|
|
|
|
- name: Validate version
|
|
|
|
run: |
|
|
|
|
$pythonVersion = (python --version)
|
2022-12-22 07:02:09 -05:00
|
|
|
if ("$pythonVersion" -NotMatch "${{ matrix.python-version }}"){
|
|
|
|
Write-Host "The current version is $pythonVersion; expected version is ${{ matrix.python-version }}"
|
|
|
|
exit 1
|
|
|
|
}
|
|
|
|
$pythonVersion
|
|
|
|
shell: pwsh
|
|
|
|
|
|
|
|
setup-python-multiple-python-versions:
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2024-10-24 09:38:22 -04:00
|
|
|
os: [ubuntu-latest, windows-latest, macos-latest, macos-13]
|
2022-12-22 07:02:09 -05:00
|
|
|
steps:
|
2023-11-08 05:16:06 -05:00
|
|
|
- uses: actions/checkout@v4
|
2022-12-22 07:02:09 -05:00
|
|
|
- name: Setup Python and check latest
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
python-version: |
|
2023-03-09 05:44:56 -05:00
|
|
|
3.9
|
|
|
|
3.10
|
2024-06-27 14:18:32 -04:00
|
|
|
3.11
|
|
|
|
3.12
|
2024-10-24 09:38:22 -04:00
|
|
|
3.13
|
2022-12-22 07:02:09 -05:00
|
|
|
check-latest: true
|
|
|
|
- name: Validate version
|
|
|
|
run: |
|
|
|
|
$pythonVersion = (python --version)
|
2024-10-24 09:38:22 -04:00
|
|
|
if ("$pythonVersion" -NotMatch "3.13"){
|
|
|
|
Write-Host "The current version is $pythonVersion; expected version is 3.13"
|
2022-07-25 10:54:04 -04:00
|
|
|
exit 1
|
|
|
|
}
|
|
|
|
$pythonVersion
|
2023-01-27 16:19:31 -05:00
|
|
|
shell: pwsh
|