Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 813f9b1

Browse filesBrowse files
Merge pull request actions#423 from vsafonkin/v-vsafonkin/update-docs-v4
Update docs to v4 version
2 parents d09bd5e + 775367d commit 813f9b1
Copy full SHA for 813f9b1

File tree

Expand file treeCollapse file tree

2 files changed

+33
-22
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+33
-22
lines changed

‎README.md

Copy file name to clipboardExpand all lines: README.md
+25-14Lines changed: 25 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# setup-python V3
1+
# setup-python V4
22

33
<p align="left">
44
<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,6 +20,7 @@ This action sets up a Python environment for use in actions by:
2020
- Support for pre-release versions of Python.
2121
- Support for installing any version of PyPy on-flight
2222
- Support for built-in caching of pip, pipenv and poetry dependencies
23+
- Support for `.python-version` file
2324

2425
# Usage
2526

@@ -29,13 +30,23 @@ Basic:
2930
```yaml
3031
steps:
3132
- uses: actions/checkout@v3
32-
- uses: actions/setup-python@v3
33+
- uses: actions/setup-python@v4
3334
with:
3435
python-version: '3.x' # Version range or exact version of a Python version to use, using SemVer's version range syntax
3536
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified
3637
- run: python my_script.py
3738
```
3839
40+
Read Python version from file:
41+
```yaml
42+
steps:
43+
- uses: actions/checkout@v3
44+
- uses: actions/setup-python@v4
45+
with:
46+
python-version-file: '.python-version' # Read python version from a file
47+
- run: python my_script.py
48+
```
49+
3950
Matrix Testing:
4051
```yaml
4152
jobs:
@@ -48,7 +59,7 @@ jobs:
4859
steps:
4960
- uses: actions/checkout@v3
5061
- name: Set up Python
51-
uses: actions/setup-python@v3
62+
uses: actions/setup-python@v4
5263
with:
5364
python-version: ${{ matrix.python-version }}
5465
architecture: x64
@@ -72,7 +83,7 @@ jobs:
7283
steps:
7384
- uses: actions/checkout@v3
7485
- name: Set up Python
75-
uses: actions/setup-python@v3
86+
uses: actions/setup-python@v4
7687
with:
7788
python-version: ${{ matrix.python-version }}
7889
- name: Display Python version
@@ -90,7 +101,7 @@ jobs:
90101
python-version: ['3.7.4', '3.8', '3.9', '3.10']
91102
steps:
92103
- uses: actions/checkout@v3
93-
- uses: actions/setup-python@v3
104+
- uses: actions/setup-python@v4
94105
with:
95106
python-version: ${{ matrix.python-version }}
96107
- run: python my_script.py
@@ -100,7 +111,7 @@ Download and set up an accurate pre-release version of Python:
100111
```yaml
101112
steps:
102113
- uses: actions/checkout@v3
103-
- uses: actions/setup-python@v3
114+
- uses: actions/setup-python@v4
104115
with:
105116
python-version: '3.11.0-alpha.1'
106117
- run: python my_script.py
@@ -110,7 +121,7 @@ Download and set up the latest available version of Python (includes both pre-re
110121
```yaml
111122
steps:
112123
- uses: actions/checkout@v3
113-
- uses: actions/setup-python@v3
124+
- uses: actions/setup-python@v4
114125
with:
115126
python-version: '3.11.0-alpha - 3.11.0' # SemVer's version range syntax
116127
- run: python my_script.py
@@ -130,7 +141,7 @@ jobs:
130141
- 'pypy3.8' # the latest available version of PyPy that supports Python 3.8
131142
steps:
132143
- uses: actions/checkout@v3
133-
- uses: actions/setup-python@v3
144+
- uses: actions/setup-python@v4
134145
with:
135146
python-version: ${{ matrix.python-version }}
136147
- run: python my_script.py
@@ -144,7 +155,7 @@ jobs:
144155
runs-on: ubuntu-latest
145156
steps:
146157
- uses: actions/checkout@v3
147-
- uses: actions/setup-python@v3
158+
- uses: actions/setup-python@v4
148159
id: cp310
149160
with:
150161
python-version: "3.10"
@@ -245,7 +256,7 @@ The requirements file format allows to specify dependency versions using logical
245256
```yaml
246257
steps:
247258
- uses: actions/checkout@v3
248-
- uses: actions/setup-python@v3
259+
- uses: actions/setup-python@v4
249260
with:
250261
python-version: '3.9'
251262
cache: 'pip'
@@ -258,7 +269,7 @@ steps:
258269
- uses: actions/checkout@v3
259270
- name: Install pipenv
260271
run: pipx install pipenv
261-
- uses: actions/setup-python@v3
272+
- uses: actions/setup-python@v4
262273
with:
263274
python-version: '3.9'
264275
cache: 'pipenv'
@@ -271,7 +282,7 @@ steps:
271282
- uses: actions/checkout@v3
272283
- name: Install poetry
273284
run: pipx install poetry
274-
- uses: actions/setup-python@v3
285+
- uses: actions/setup-python@v4
275286
with:
276287
python-version: '3.9'
277288
cache: 'poetry'
@@ -283,7 +294,7 @@ steps:
283294
```yaml
284295
steps:
285296
- uses: actions/checkout@v3
286-
- uses: actions/setup-python@v3
297+
- uses: actions/setup-python@v4
287298
with:
288299
python-version: '3.9'
289300
cache: 'pip'
@@ -297,7 +308,7 @@ steps:
297308
- uses: actions/checkout@v3
298309
- name: Install pipenv
299310
run: pipx install pipenv
300-
- uses: actions/setup-python@v3
311+
- uses: actions/setup-python@v4
301312
with:
302313
python-version: '3.9'
303314
cache: 'pipenv'

‎docs/adrs/0000-caching-dependencies.md

Copy file name to clipboardExpand all lines: docs/adrs/0000-caching-dependencies.md
+8-8Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ We won't pursue the goal to provide wide customization of caching in the scope o
4545

4646
```
4747
steps:
48-
- uses: actions/checkout@v2
49-
- uses: actions/setup-python@v2
48+
- uses: actions/checkout@v3
49+
- uses: actions/setup-python@v4
5050
with:
5151
python-version: 3.9
5252
cache: pip
@@ -56,8 +56,8 @@ steps:
5656

5757
```
5858
steps:
59-
- uses: actions/checkout@v2
60-
- uses: actions/setup-python@v2
59+
- uses: actions/checkout@v3
60+
- uses: actions/setup-python@v4
6161
with:
6262
python-version: 3.9
6363
cache: pipenv
@@ -66,8 +66,8 @@ steps:
6666

6767
```
6868
steps:
69-
- uses: actions/checkout@v2
70-
- uses: actions/setup-python@v2
69+
- uses: actions/checkout@v3
70+
- uses: actions/setup-python@v4
7171
with:
7272
python-version: 3.9
7373
cache: pip
@@ -80,8 +80,8 @@ steps:
8080

8181
```
8282
steps:
83-
- uses: actions/checkout@v2
84-
- uses: actions/setup-python@v2
83+
- uses: actions/checkout@v3
84+
- uses: actions/setup-python@v4
8585
with:
8686
python-version: 3.9
8787
cache: pip

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.