mirror of
https://github.com/actions/setup-python.git
synced 2025-07-02 23:53:47 +00:00
Merge branch 'main' into v-dmshib/fix-poetry-version
This commit is contained in:
commit
1bf6441475
23 changed files with 3174 additions and 833 deletions
28
.github/workflows/e2e-cache.yml
vendored
28
.github/workflows/e2e-cache.yml
vendored
|
@ -39,7 +39,7 @@ jobs:
|
|||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest, macos-latest]
|
||||
python-version: ['3.9', 'pypy-3.7-v7.x']
|
||||
python-version: ['3.9', 'pypy-3.9-v7.x']
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Setup Python
|
||||
|
@ -48,11 +48,17 @@ jobs:
|
|||
python-version: ${{ matrix.python-version }}
|
||||
cache: 'pipenv'
|
||||
- name: Install pipenv
|
||||
run: pipx install pipenv
|
||||
run: curl https://raw.githubusercontent.com/pypa/pipenv/master/get-pipenv.py | python
|
||||
- name: Install dependencies
|
||||
shell: pwsh
|
||||
run: |
|
||||
cd __tests__/data
|
||||
pipenv install --verbose
|
||||
mv ./__tests__/data/Pipfile.lock .
|
||||
mv ./__tests__/data/Pipfile .
|
||||
if ("${{ matrix.python-version }}" -Match "pypy") {
|
||||
pipenv install --keep-outdated --python pypy
|
||||
} else {
|
||||
pipenv install --keep-outdated --python ${{ matrix.python-version }}
|
||||
}
|
||||
|
||||
python-poetry-dependencies-caching:
|
||||
name: Test poetry (Python ${{ matrix.python-version}}, ${{ matrix.os }})
|
||||
|
@ -102,7 +108,7 @@ jobs:
|
|||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest, macos-latest]
|
||||
python-version: ['3.9', 'pypy-3.7-v7.x']
|
||||
python-version: ['3.9', 'pypy-3.9-v7.x']
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Setup Python
|
||||
|
@ -112,8 +118,14 @@ jobs:
|
|||
cache: 'pipenv'
|
||||
cache-dependency-path: '**/pipenv-requirements.txt'
|
||||
- name: Install pipenv
|
||||
run: pipx install pipenv
|
||||
run: curl https://raw.githubusercontent.com/pypa/pipenv/master/get-pipenv.py | python
|
||||
- name: Install dependencies
|
||||
shell: pwsh
|
||||
run: |
|
||||
cd __tests__/data
|
||||
pipenv install --verbose
|
||||
mv ./__tests__/data/Pipfile.lock .
|
||||
mv ./__tests__/data/Pipfile .
|
||||
if ("${{ matrix.python-version }}" -Match "pypy") {
|
||||
pipenv install --keep-outdated --python pypy
|
||||
} else {
|
||||
pipenv install --keep-outdated --python ${{ matrix.python-version }}
|
||||
}
|
26
.github/workflows/test-pypy.yml
vendored
26
.github/workflows/test-pypy.yml
vendored
|
@ -65,3 +65,29 @@ jobs:
|
|||
EXECUTABLE=${EXECUTABLE%%-*} # remove any -* suffixe
|
||||
${EXECUTABLE} --version
|
||||
shell: bash
|
||||
|
||||
setup-pypy-noenv:
|
||||
name: Setup PyPy ${{ matrix.pypy }} ${{ matrix.os }} (noenv)
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [macos-latest, windows-latest, ubuntu-18.04, ubuntu-latest]
|
||||
pypy: ['pypy2.7', 'pypy3.7', 'pypy3.8', 'pypy3.9-nightly']
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: setup-python ${{ matrix.pypy }}
|
||||
id: setup-python
|
||||
uses: ./
|
||||
with:
|
||||
python-version: ${{ matrix.pypy }}
|
||||
update-environment: false
|
||||
|
||||
- name: PyPy and Python version
|
||||
run: ${{ steps.setup-python.outputs.python-path }} --version
|
||||
|
||||
- name: Run simple code
|
||||
run: ${{ steps.setup-python.outputs.python-path }} -c 'import math; print(math.factorial(5))'
|
||||
|
|
25
.github/workflows/test-python.yml
vendored
25
.github/workflows/test-python.yml
vendored
|
@ -147,3 +147,28 @@ jobs:
|
|||
|
||||
- name: Run simple code
|
||||
run: python -c 'import math; print(math.factorial(5))'
|
||||
|
||||
setup-versions-noenv:
|
||||
name: Setup ${{ matrix.python }} ${{ matrix.os }} (noenv)
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [macos-latest, windows-latest, ubuntu-18.04, ubuntu-20.04]
|
||||
python: ["3.7", "3.8", "3.9", "3.10"]
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: setup-python ${{ matrix.python }}
|
||||
id: setup-python
|
||||
uses: ./
|
||||
with:
|
||||
python-version: ${{ matrix.python }}
|
||||
update-environment: false
|
||||
|
||||
- name: Python version
|
||||
run: ${{ steps.setup-python.outputs.python-path }} --version
|
||||
|
||||
- name: Run simple code
|
||||
run: ${{ steps.setup-python.outputs.python-path }} -c 'import math; print(math.factorial(5))'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue