mirror of
https://github.com/actions/setup-python.git
synced 2025-04-24 23:42:13 +00:00
fix test-python.yml
This commit is contained in:
parent
614f5d9bc8
commit
0e03ef2a51
1 changed files with 24 additions and 25 deletions
49
.github/workflows/test-python.yml
vendored
49
.github/workflows/test-python.yml
vendored
|
@ -120,36 +120,12 @@ jobs:
|
||||||
- name: Run simple code
|
- name: Run simple code
|
||||||
run: python -c 'import math; print(math.factorial(5))'
|
run: python -c 'import math; print(math.factorial(5))'
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
check-latest:
|
|
||||||
=======
|
|
||||||
setup-dev-version:
|
setup-dev-version:
|
||||||
name: Setup 3.9-dev ${{ matrix.os }}
|
name: Setup 3.9-dev ${{ matrix.os }}
|
||||||
>>>>>>> main
|
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
<<<<<<< HEAD
|
|
||||||
os: [ubuntu-latest, windows-latest, macos-latest]
|
|
||||||
python-version: ["3.8", "3.9", "3.10"]
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- name: Setup Python and check latest
|
|
||||||
uses: ./
|
|
||||||
with:
|
|
||||||
python-version: ${{ matrix.python-version }}
|
|
||||||
check-latest: true
|
|
||||||
- name: Validate version
|
|
||||||
run: |
|
|
||||||
$pythonVersion = (python --version)
|
|
||||||
if ("$pythonVersion" -NotMatch "${{ matrix.python }}"){
|
|
||||||
Write-Host "The current version is $pythonVersion; expected version is ${{ matrix.python }}"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
$pythonVersion
|
|
||||||
shell: pwsh
|
|
||||||
=======
|
|
||||||
os: [macos-latest, windows-latest, ubuntu-latest]
|
os: [macos-latest, windows-latest, ubuntu-latest]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
|
@ -171,4 +147,27 @@ jobs:
|
||||||
|
|
||||||
- name: Run simple code
|
- name: Run simple code
|
||||||
run: python -c 'import math; print(math.factorial(5))'
|
run: python -c 'import math; print(math.factorial(5))'
|
||||||
>>>>>>> main
|
|
||||||
|
check-latest:
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os: [ubuntu-latest, windows-latest, macos-latest]
|
||||||
|
python-version: ["3.8", "3.9", "3.10"]
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- name: Setup Python and check latest
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
python-version: ${{ matrix.python-version }}
|
||||||
|
check-latest: true
|
||||||
|
- name: Validate version
|
||||||
|
run: |
|
||||||
|
$pythonVersion = (python --version)
|
||||||
|
if ("$pythonVersion" -NotMatch "${{ matrix.python }}"){
|
||||||
|
Write-Host "The current version is $pythonVersion; expected version is ${{ matrix.python }}"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
$pythonVersion
|
||||||
|
shell: pwsh
|
Loading…
Add table
Reference in a new issue