Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: actions/setup-python
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v4.6.1
Choose a base ref
...
head repository: actions/setup-python
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v4.7.0
Choose a head ref
  • 6 commits
  • 23 files changed
  • 4 contributors

Commits on Jun 19, 2023

  1. Copy the full SHA
    3f824b7 View commit details

Commits on Jun 28, 2023

  1. Copy the full SHA
    0d5da6a View commit details

Commits on Jul 13, 2023

  1. Copy the full SHA
    c16c4b8 View commit details
  2. Copy the full SHA
    014d32a View commit details
  3. Copy the full SHA
    ea5b57f View commit details
  4. Copy the full SHA
    61a6322 View commit details
28 changes: 22 additions & 6 deletions .github/workflows/e2e-cache.yml
Original file line number Diff line number Diff line change
@@ -43,22 +43,30 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Setup Python
id: cache-pipenv
uses: ./
with:
python-version: ${{ matrix.python-version }}
cache: 'pipenv'
- name: Install pipenv
run: curl https://raw.githubusercontent.com/pypa/pipenv/master/get-pipenv.py | python
- name: Install dependencies
- name: Prepare environment
shell: pwsh
run: |
mv ./__tests__/data/Pipfile.lock .
mv ./__tests__/data/Pipfile .
mv ./__tests__/test-pipenv.py .
- name: Install dependencies
shell: pwsh
if: steps.cache-pipenv.outputs.cache-hit != 'true'
run: |
if ("${{ matrix.python-version }}" -Match "pypy") {
pipenv install --keep-outdated --python pypy
pipenv install --python pypy # --keep-outdated
} else {
pipenv install --keep-outdated --python ${{ matrix.python-version }}
pipenv install --python ${{ matrix.python-version }} # --keep-outdated
}
- name: Run Python Script
run: pipenv run python test-pipenv.py

python-poetry-dependencies-caching:
name: Test poetry (Python ${{ matrix.python-version}}, ${{ matrix.os }})
@@ -112,20 +120,28 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Setup Python
id: cache-pipenv
uses: ./
with:
python-version: ${{ matrix.python-version }}
cache: 'pipenv'
cache-dependency-path: '**/pipenv-requirements.txt'
- name: Install pipenv
run: curl https://raw.githubusercontent.com/pypa/pipenv/master/get-pipenv.py | python
- name: Install dependencies
- name: Prepare environment
shell: pwsh
run: |
mv ./__tests__/data/Pipfile.lock .
mv ./__tests__/data/Pipfile .
mv ./__tests__/test-pipenv.py .
- name: Install dependencies
shell: pwsh
if: steps.cache-pipenv.outputs.cache-hit != 'true'
run: |
if ("${{ matrix.python-version }}" -Match "pypy") {
pipenv install --keep-outdated --python pypy
pipenv install --python pypy # --keep-outdated
} else {
pipenv install --keep-outdated --python ${{ matrix.python-version }}
pipenv install --python ${{ matrix.python-version }} # --keep-outdated
}
- name: Run Python Script
run: pipenv run python test-pipenv.py
28 changes: 21 additions & 7 deletions .github/workflows/e2e-tests.yml
Original file line number Diff line number Diff line change
@@ -21,13 +21,6 @@ jobs:
- name: Checkout
uses: actions/checkout@v3

- name: Run with setup-python 2.7
uses: ./
with:
python-version: 2.7
- name: Verify 2.7
run: python __tests__/verify-python.py 2.7

- name: Run with setup-python 3.5
uses: ./
with:
@@ -86,3 +79,24 @@ jobs:
run: python __tests__/verify-python.py 3.10
- name: Run python-path sample 3.10
run: pipx run --python '${{ steps.cp310.outputs.python-path }}' nox --version

- name: Run with setup-python ==3.8
uses: ./
with:
python-version: '==3.8'
- name: Verify ==3.8
run: python __tests__/verify-python.py 3.8

- name: Run with setup-python <3.11
uses: ./
with:
python-version: '<3.11'
- name: Verify <3.11
run: python __tests__/verify-python.py 3.10

- name: Run with setup-python >3.8
uses: ./
with:
python-version: '>3.8'
- name: Verify >3.8
run: python __tests__/verify-python.py 3.11
147 changes: 146 additions & 1 deletion .github/workflows/test-python.yml
Original file line number Diff line number Diff line change
@@ -86,7 +86,152 @@ jobs:
id: setup-python
uses: ./
with:
python-version-file: '.python-version'
python-version-file: .python-version

- name: Check python-path
run: ./__tests__/check-python-path.sh '${{ steps.setup-python.outputs.python-path }}'
shell: bash

- 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))'

setup-versions-from-file-without-parameter:
name: Setup ${{ matrix.python }} ${{ matrix.os }} version file without parameter
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-latest, windows-latest, ubuntu-20.04, ubuntu-22.04]
python: [3.5.4, 3.6.7, 3.7.5, 3.8.15, 3.9.13]
exclude:
- os: ubuntu-22.04
python: 3.5.4
- os: ubuntu-22.04
python: 3.6.7
- os: ubuntu-22.04
python: 3.7.5
- os: windows-latest
python: 3.8.15
steps:
- name: Checkout
uses: actions/checkout@v3

- name: build-version-file ${{ matrix.python }}
run: echo ${{ matrix.python }} > .python-version

- name: setup-python ${{ matrix.python }}
id: setup-python
uses: ./

- name: Check python-path
run: ./__tests__/check-python-path.sh '${{ steps.setup-python.outputs.python-path }}'
shell: bash

- 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))'

setup-versions-from-standard-pyproject-file:
name: Setup ${{ matrix.python }} ${{ matrix.os }} standard pyproject file
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-latest, windows-latest, ubuntu-20.04, ubuntu-22.04]
python: [3.5.4, 3.6.7, 3.7.5, 3.8.15, 3.9.13]
exclude:
- os: ubuntu-22.04
python: 3.5.4
- os: ubuntu-22.04
python: 3.6.7
- os: ubuntu-22.04
python: 3.7.5
- os: windows-latest
python: 3.8.15
steps:
- name: Checkout
uses: actions/checkout@v3

- name: build-version-file ${{ matrix.python }}
run: |
echo '[project]
requires-python = "${{ matrix.python }}"
' > pyproject.toml
- name: setup-python ${{ matrix.python }}
id: setup-python
uses: ./
with:
python-version-file: pyproject.toml

- name: Check python-path
run: ./__tests__/check-python-path.sh '${{ steps.setup-python.outputs.python-path }}'
shell: bash

- 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))'

setup-versions-from-poetry-pyproject-file:
name: Setup ${{ matrix.python }} ${{ matrix.os }} poetry pyproject file
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-latest, windows-latest, ubuntu-20.04, ubuntu-22.04]
python: [3.5.4, 3.6.7, 3.7.5, 3.8.15, 3.9.13]
exclude:
- os: ubuntu-22.04
python: 3.5.4
- os: ubuntu-22.04
python: 3.6.7
- os: ubuntu-22.04
python: 3.7.5
- os: windows-latest
python: 3.8.15
steps:
- name: Checkout
uses: actions/checkout@v3

- name: build-version-file ${{ matrix.python }}
run: |
echo '[tool.poetry.dependencies]
python = "${{ matrix.python }}"
' > pyproject.toml
- name: setup-python ${{ matrix.python }}
id: setup-python
uses: ./
with:
python-version-file: pyproject.toml

- name: Check python-path
run: ./__tests__/check-python-path.sh '${{ steps.setup-python.outputs.python-path }}'
2 changes: 1 addition & 1 deletion .licenses/npm/@azure/ms-rest-js.dep.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 26 additions & 0 deletions .licenses/npm/@iarna/toml.dep.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

34 changes: 0 additions & 34 deletions .licenses/npm/ip-regex.dep.yml

This file was deleted.

43 changes: 0 additions & 43 deletions .licenses/npm/psl.dep.yml

This file was deleted.

Loading