Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
os: [macos-latest, windows-latest, ubuntu-latest]
steps:
- name: Checkout code
uses: actions/checkout@v6
uses: actions/checkout@v7
with:
persist-credentials: false
submodules: recursive
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/periodic_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
matrix-json: ${{ steps.matrix.outputs.matrix }}
steps:
- name: Checkout code
uses: actions/checkout@v6
uses: actions/checkout@v7
with:
persist-credentials: false
submodules: recursive
Expand All @@ -38,7 +38,7 @@ jobs:
matrix: ${{ fromJSON(needs.create_matrix.outputs.matrix-json) }}
steps:
- name: Checkout code
uses: actions/checkout@v6
uses: actions/checkout@v7
with:
persist-credentials: false
submodules: recursive
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
matrix-json: ${{ steps.matrix.outputs.matrix }}
steps:
- name: Checkout code
uses: actions/checkout@v6
uses: actions/checkout@v7
with:
persist-credentials: false
submodules: recursive
Expand All @@ -44,7 +44,7 @@ jobs:
matrix: ${{ fromJSON(needs.create_matrix.outputs.matrix-json) }}
steps:
- name: Checkout code
uses: actions/checkout@v6
uses: actions/checkout@v7
with:
persist-credentials: false
submodules: recursive
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,9 @@ This action supports the following inputs (in bold are the names of the exclusiv
|token|The token used to authenticate when fetching Python distributions from [actions/python-versions](https://github.com/actions/python-versions). When running this action on github.com, the default value is sufficient. When running on GHES, you can pass a personal access token for github.com if you are experiencing rate limiting.|example: `TokenString`|`github.token`|
|cache-dependency-path|Used to specify the path to dependency files. Supports wildcards or a list of file names for caching multiple dependencies.|example: `path/to/dependency/files`|`''`|
|update-environment|Set this option if you want the action to update environment variables.|`true`, `false`|`true`|
|freethreaded| When 'true', use the freethreaded version of Python.|`true`, `false`|`false`|
|freethreaded|When 'true', use the freethreaded version of Python.|`true`, `false`|`false`|
|allow-prereleases|When 'true', a version range passed to 'python-version' input will match prerelease versions if no GA versions are found. Only 'x.y' version range is supported for CPython.|`true`, `false`|`false`|
|pip-version|Used to specify the version of pip to install with the Python. Supported format: `major[.minor][.patch]`.|`20.0.0`, `22`|`None`|
|**cache-build**|Whether to cache the built Python distribution to speed up successive runs.|`true`, `false`|`false`|
|**allow-build**|Set the behavior of the action when [actions/setup-python](https://github.com/actions/setup-python) fails and has to be built from source.|`allow`, `info`, `warn`, `error`, `force`|`warn`|

Expand Down
11 changes: 9 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ inputs:
freethreaded:
description: "When 'true', use the freethreaded version of Python."
default: false
pip-version:
description: "Used to specify the version of pip to install with the Python. Supported format: major[.minor][.patch]. If unset, the action tries to install a default pip non-fatally."
outputs:
python-version:
description: "The installed Python or PyPy version. Useful when given a version range as input."
Expand All @@ -49,6 +51,9 @@ outputs:
python-path:
description: "The absolute path to the Python or PyPy executable."
value: ${{ steps.setup.outputs.python-path }}
env:
# Temporary workaround for Python 3.5 failures - May 2024
PIP_TRUSTED_HOST: "pypi.python.org pypi.org files.pythonhosted.org"
runs:
using: composite
steps:
Expand All @@ -64,7 +69,7 @@ runs:
token: ${{ inputs.token }}
allow-prereleases: ${{ inputs.allow-prereleases }}
freethreaded: ${{ inputs.freethreaded }}
- uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0
id: setup
with:
python-version: ${{ steps.build.outputs.python-version }}
Expand All @@ -75,8 +80,10 @@ runs:
cache-dependency-path: ${{ inputs.cache-dependency-path }}
update-environment: ${{ inputs.update-environment }}
freethreaded: ${{ steps.build.outputs.freethreaded }}
pip-version: ${{ inputs.pip-version }}
- run: ${{ github.action_path }}/setup_pip.ps1
shell: pwsh
env:
PYTHON_VERSION: ${{ steps.setup.outputs.python-version }}
SETUP_PYTHON_PATH: ${{ steps.setup.outputs.python-path }}
SETUP_PYTHON_PATH: ${{ steps.setup.outputs.python-path }}

2 changes: 1 addition & 1 deletion setup_pip.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ if (!($Semver[0] -like 'pypy*') -and ([int]$Semver[0] -eq 3 -and [int]$Semver[1]
Invoke-Expression -Command "$PythonPath -m pip install --upgrade pip"
Write-Output "Installing wheel and setuptools..."
Invoke-Expression -Command "$PythonPath -m pip install --upgrade wheel setuptools"
}
}
Loading