2020-06-16 15:39:00 +00:00
|
|
|
name: Validate 'versions-manifest.json' file
|
2021-09-06 11:49:01 +00:00
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
2020-06-16 15:39:00 +00:00
|
|
|
push:
|
|
|
|
branches:
|
2020-07-14 14:22:51 +00:00
|
|
|
- main
|
2020-06-16 15:39:00 +00:00
|
|
|
paths:
|
|
|
|
- 'versions-manifest.json'
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
setup-versions-from-manifest:
|
|
|
|
name: Setup ${{ matrix.python }} ${{ matrix.os }}
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2022-06-05 07:49:36 +00:00
|
|
|
os: [macos-latest, windows-latest, ubuntu-latest, ubuntu-22.04]
|
|
|
|
python: [3.11.0]
|
2020-06-16 15:39:00 +00:00
|
|
|
steps:
|
|
|
|
- name: setup-python ${{ matrix.python }}
|
2022-06-05 07:49:36 +00:00
|
|
|
uses: actions/setup-python@main
|
2020-06-16 15:39:00 +00:00
|
|
|
with:
|
|
|
|
python-version: ${{ matrix.python }}
|
|
|
|
|
|
|
|
- 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
|
2021-09-06 11:49:01 +00:00
|
|
|
run: python -c 'import math; print(math.factorial(5))'
|