python-versions/.github/workflows/releases-validation.yml

37 lines
1002 B
YAML
Raw Normal View History

name: Validate 'versions-manifest.json' file
2021-09-06 11:49:01 +00:00
on:
workflow_dispatch:
push:
branches:
2020-07-14 14:22:51 +00:00
- main
paths:
- 'versions-manifest.json'
jobs:
setup-versions-from-manifest:
name: Setup ${{ matrix.python }} ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
2021-10-12 13:10:31 +00:00
os: [macos-latest, windows-latest, ubuntu-18.04, ubuntu-20.04]
python: [3.5.4, 3.6.7, 3.7.5, 3.8.1]
steps:
- name: setup-python ${{ matrix.python }}
uses: actions/setup-python@v2
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))'