2020-12-17 22:03:54 +07:00
|
|
|
name: Validate Python e2e
|
2022-06-08 19:58:05 +07:00
|
|
|
on:
|
2020-04-30 00:57:02 +07:00
|
|
|
push:
|
2020-05-01 23:52:58 +07:00
|
|
|
branches:
|
2020-07-14 21:04:57 +07:00
|
|
|
- main
|
2020-05-01 23:52:58 +07:00
|
|
|
paths-ignore:
|
|
|
|
- '**.md'
|
2020-04-30 00:57:02 +07:00
|
|
|
pull_request:
|
2020-05-01 23:52:58 +07:00
|
|
|
paths-ignore:
|
|
|
|
- '**.md'
|
2020-04-30 00:57:02 +07:00
|
|
|
schedule:
|
2020-12-17 22:03:54 +07:00
|
|
|
- cron: 30 3 * * *
|
2022-06-02 21:37:57 +07:00
|
|
|
workflow_dispatch:
|
2020-04-30 00:57:02 +07:00
|
|
|
|
|
|
|
jobs:
|
2022-06-02 21:37:57 +07:00
|
|
|
setup-versions-from-manifest:
|
|
|
|
name: Setup ${{ matrix.python }} ${{ matrix.os }}
|
2020-04-30 00:57:02 +07:00
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2021-09-29 22:05:36 +07:00
|
|
|
os: [macos-latest, windows-latest, ubuntu-18.04, ubuntu-20.04]
|
2022-06-02 21:37:57 +07:00
|
|
|
python: [3.5.4, 3.6.7, 3.7.5, 3.8.1]
|
2020-04-30 00:57:02 +07:00
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2022-06-02 21:37:57 +07:00
|
|
|
uses: actions/checkout@v3
|
2020-04-30 00:57:02 +07:00
|
|
|
|
2022-06-02 21:37:57 +07:00
|
|
|
- name: setup-python ${{ matrix.python }}
|
2022-05-24 01:59:37 +07:00
|
|
|
id: setup-python
|
2020-04-30 00:57:02 +07:00
|
|
|
uses: ./
|
2022-06-02 21:37:57 +07:00
|
|
|
with:
|
|
|
|
python-version: ${{ matrix.python }}
|
2020-04-30 00:57:02 +07:00
|
|
|
|
2022-05-24 01:59:37 +07:00
|
|
|
- name: Check python-path
|
|
|
|
run: ./__tests__/check-python-path.sh '${{ steps.setup-python.outputs.python-path }}'
|
|
|
|
shell: bash
|
|
|
|
|
2020-04-30 00:57:02 +07:00
|
|
|
- name: Validate version
|
2022-06-02 21:37:57 +07:00
|
|
|
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
|
2020-04-30 00:57:02 +07:00
|
|
|
|
2022-06-02 21:37:57 +07:00
|
|
|
- name: Run simple code
|
2020-04-30 00:57:02 +07:00
|
|
|
run: python -c 'import math; print(math.factorial(5))'
|
|
|
|
|
2022-06-02 21:37:57 +07:00
|
|
|
setup-versions-from-file:
|
|
|
|
name: Setup ${{ matrix.python }} ${{ matrix.os }} version file
|
2020-04-30 00:57:02 +07:00
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2021-09-29 22:05:36 +07:00
|
|
|
os: [macos-latest, windows-latest, ubuntu-18.04, ubuntu-20.04]
|
2020-04-30 00:57:02 +07:00
|
|
|
python: [3.5.4, 3.6.7, 3.7.5, 3.8.1]
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2022-06-02 21:37:57 +07:00
|
|
|
uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- name: build-version-file ${{ matrix.python }}
|
|
|
|
run: echo ${{ matrix.python }} > .python-version
|
2020-04-30 00:57:02 +07:00
|
|
|
|
|
|
|
- name: setup-python ${{ matrix.python }}
|
2022-05-24 01:59:37 +07:00
|
|
|
id: setup-python
|
2020-04-30 00:57:02 +07:00
|
|
|
uses: ./
|
|
|
|
with:
|
2022-06-02 21:37:57 +07:00
|
|
|
python-version-file: '.python-version'
|
2020-04-30 00:57:02 +07:00
|
|
|
|
2022-05-24 01:59:37 +07:00
|
|
|
- name: Check python-path
|
|
|
|
run: ./__tests__/check-python-path.sh '${{ steps.setup-python.outputs.python-path }}'
|
|
|
|
shell: bash
|
|
|
|
|
2020-04-30 00:57:02 +07:00
|
|
|
- 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 16:58:03 +07:00
|
|
|
|
|
|
|
setup-pre-release-version-from-manifest:
|
|
|
|
name: Setup 3.9.0-beta.4 ${{ matrix.os }}
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2021-09-29 22:05:36 +07:00
|
|
|
os: [macos-latest, windows-latest, ubuntu-18.04, ubuntu-20.04]
|
2020-07-17 16:58:03 +07:00
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2022-06-02 21:37:57 +07:00
|
|
|
uses: actions/checkout@v3
|
2020-07-17 16:58:03 +07:00
|
|
|
|
|
|
|
- name: setup-python 3.9.0-beta.4
|
2022-05-24 01:59:37 +07:00
|
|
|
id: setup-python
|
2020-07-17 16:58:03 +07:00
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
python-version: '3.9.0-beta.4'
|
|
|
|
|
2022-05-24 01:59:37 +07:00
|
|
|
- name: Check python-path
|
|
|
|
run: ./__tests__/check-python-path.sh '${{ steps.setup-python.outputs.python-path }}'
|
|
|
|
shell: bash
|
|
|
|
|
2020-07-17 16:58:03 +07:00
|
|
|
- name: Validate version
|
|
|
|
run: |
|
|
|
|
$pythonVersion = (python --version)
|
|
|
|
if ("Python 3.9.0b4" -ne "$pythonVersion"){
|
|
|
|
Write-Host "The current version is $pythonVersion; expected version is 3.9.0b4"
|
|
|
|
exit 1
|
|
|
|
}
|
|
|
|
$pythonVersion
|
|
|
|
shell: pwsh
|
|
|
|
|
|
|
|
- name: Run simple code
|
|
|
|
run: python -c 'import math; print(math.factorial(5))'
|
2020-12-08 04:59:14 +07:00
|
|
|
|
2022-06-08 19:58:05 +07:00
|
|
|
setup-dev-version:
|
|
|
|
name: Setup 3.9-dev ${{ matrix.os }}
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
os: [macos-latest, windows-latest, ubuntu-latest]
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- name: setup-python 3.9-dev
|
|
|
|
id: setup-python
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
python-version: '3.9-dev'
|
|
|
|
|
|
|
|
- name: Check python-path
|
|
|
|
run: ./__tests__/check-python-path.sh '${{ steps.setup-python.outputs.python-path }}'
|
|
|
|
shell: bash
|
|
|
|
|
|
|
|
- name: Validate version
|
|
|
|
run: ${{ startsWith(steps.setup-python.outputs.python-version, '3.9.') }}
|
|
|
|
shell: bash
|
|
|
|
|
|
|
|
- name: Run simple code
|
|
|
|
run: python -c 'import math; print(math.factorial(5))'
|