mirror of
https://github.com/actions/setup-python.git
synced 2025-04-24 15:32:13 +00:00
revert readme changes
This commit is contained in:
parent
a6063fd7cd
commit
0139695565
1 changed files with 13 additions and 25 deletions
38
README.md
38
README.md
|
@ -1,4 +1,4 @@
|
||||||
# setup-python v4
|
# setup-python V3
|
||||||
|
|
||||||
<p align="left">
|
<p align="left">
|
||||||
<a href="https://github.com/actions/setup-python"><img alt="GitHub Actions status" src="https://github.com/actions/setup-python/workflows/Main%20workflow/badge.svg"></a>
|
<a href="https://github.com/actions/setup-python"><img alt="GitHub Actions status" src="https://github.com/actions/setup-python/workflows/Main%20workflow/badge.svg"></a>
|
||||||
|
@ -20,7 +20,6 @@ This action sets up a Python environment for use in actions by:
|
||||||
- Support for pre-release versions of Python.
|
- Support for pre-release versions of Python.
|
||||||
- Support for installing any version of PyPy on-flight
|
- Support for installing any version of PyPy on-flight
|
||||||
- Support for built-in caching of pip, pipenv and poetry dependencies
|
- Support for built-in caching of pip, pipenv and poetry dependencies
|
||||||
- Support for `.python-version` file
|
|
||||||
|
|
||||||
# Usage
|
# Usage
|
||||||
|
|
||||||
|
@ -30,24 +29,13 @@ Basic:
|
||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: actions/setup-python@v4
|
- uses: actions/setup-python@v3
|
||||||
with:
|
with:
|
||||||
python-version: '3.x' # Version range or exact version of a Python version to use, using SemVer's version range syntax
|
python-version: '3.x' # Version range or exact version of a Python version to use, using SemVer's version range syntax
|
||||||
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified
|
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified
|
||||||
- run: python my_script.py
|
- run: python my_script.py
|
||||||
```
|
```
|
||||||
|
|
||||||
Read Python version from file:
|
|
||||||
```yaml
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- uses: actions/setup-python@v4
|
|
||||||
with:
|
|
||||||
python-version-file: '.python-version' # Read python version from a file
|
|
||||||
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified
|
|
||||||
- run: python my_script.py
|
|
||||||
```
|
|
||||||
|
|
||||||
Matrix Testing:
|
Matrix Testing:
|
||||||
```yaml
|
```yaml
|
||||||
jobs:
|
jobs:
|
||||||
|
@ -60,7 +48,7 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v4
|
uses: actions/setup-python@v3
|
||||||
with:
|
with:
|
||||||
python-version: ${{ matrix.python-version }}
|
python-version: ${{ matrix.python-version }}
|
||||||
architecture: x64
|
architecture: x64
|
||||||
|
@ -84,7 +72,7 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v4
|
uses: actions/setup-python@v3
|
||||||
with:
|
with:
|
||||||
python-version: ${{ matrix.python-version }}
|
python-version: ${{ matrix.python-version }}
|
||||||
- name: Display Python version
|
- name: Display Python version
|
||||||
|
@ -102,7 +90,7 @@ jobs:
|
||||||
python-version: ['3.7.4', '3.8', '3.9', '3.10']
|
python-version: ['3.7.4', '3.8', '3.9', '3.10']
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: actions/setup-python@v4
|
- uses: actions/setup-python@v3
|
||||||
with:
|
with:
|
||||||
python-version: ${{ matrix.python-version }}
|
python-version: ${{ matrix.python-version }}
|
||||||
- run: python my_script.py
|
- run: python my_script.py
|
||||||
|
@ -112,7 +100,7 @@ Download and set up an accurate pre-release version of Python:
|
||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: actions/setup-python@v4
|
- uses: actions/setup-python@v3
|
||||||
with:
|
with:
|
||||||
python-version: '3.11.0-alpha.1'
|
python-version: '3.11.0-alpha.1'
|
||||||
- run: python my_script.py
|
- run: python my_script.py
|
||||||
|
@ -122,7 +110,7 @@ Download and set up the latest available version of Python (includes both pre-re
|
||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: actions/setup-python@v4
|
- uses: actions/setup-python@v3
|
||||||
with:
|
with:
|
||||||
python-version: '3.11.0-alpha - 3.11.0' # SemVer's version range syntax
|
python-version: '3.11.0-alpha - 3.11.0' # SemVer's version range syntax
|
||||||
- run: python my_script.py
|
- run: python my_script.py
|
||||||
|
@ -142,7 +130,7 @@ jobs:
|
||||||
- 'pypy3.8' # the latest available version of PyPy that supports Python 3.8
|
- 'pypy3.8' # the latest available version of PyPy that supports Python 3.8
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: actions/setup-python@v4
|
- uses: actions/setup-python@v3
|
||||||
with:
|
with:
|
||||||
python-version: ${{ matrix.python-version }}
|
python-version: ${{ matrix.python-version }}
|
||||||
- run: python my_script.py
|
- run: python my_script.py
|
||||||
|
@ -241,7 +229,7 @@ The requirements file format allows to specify dependency versions using logical
|
||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: actions/setup-python@v4
|
- uses: actions/setup-python@v3
|
||||||
with:
|
with:
|
||||||
python-version: '3.9'
|
python-version: '3.9'
|
||||||
cache: 'pip'
|
cache: 'pip'
|
||||||
|
@ -254,7 +242,7 @@ steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: Install pipenv
|
- name: Install pipenv
|
||||||
run: pipx install pipenv
|
run: pipx install pipenv
|
||||||
- uses: actions/setup-python@v4
|
- uses: actions/setup-python@v3
|
||||||
with:
|
with:
|
||||||
python-version: '3.9'
|
python-version: '3.9'
|
||||||
cache: 'pipenv'
|
cache: 'pipenv'
|
||||||
|
@ -267,7 +255,7 @@ steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: Install poetry
|
- name: Install poetry
|
||||||
run: pipx install poetry
|
run: pipx install poetry
|
||||||
- uses: actions/setup-python@v4
|
- uses: actions/setup-python@v3
|
||||||
with:
|
with:
|
||||||
python-version: '3.9'
|
python-version: '3.9'
|
||||||
cache: 'poetry'
|
cache: 'poetry'
|
||||||
|
@ -279,7 +267,7 @@ steps:
|
||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: actions/setup-python@v4
|
- uses: actions/setup-python@v3
|
||||||
with:
|
with:
|
||||||
python-version: '3.9'
|
python-version: '3.9'
|
||||||
cache: 'pip'
|
cache: 'pip'
|
||||||
|
@ -293,7 +281,7 @@ steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: Install pipenv
|
- name: Install pipenv
|
||||||
run: pipx install pipenv
|
run: pipx install pipenv
|
||||||
- uses: actions/setup-python@v4
|
- uses: actions/setup-python@v3
|
||||||
with:
|
with:
|
||||||
python-version: '3.9'
|
python-version: '3.9'
|
||||||
cache: 'pipenv'
|
cache: 'pipenv'
|
||||||
|
|
Loading…
Add table
Reference in a new issue