1
- # setup-python V2
1
+ # setup-python V3
2
2
3
3
<p align =" left " >
4
4
<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 >
@@ -28,8 +28,8 @@ See [action.yml](action.yml)
28
28
Basic:
29
29
``` yaml
30
30
steps :
31
- - uses : actions/checkout@v2
32
- - uses : actions/setup-python@v2
31
+ - uses : actions/checkout@v3
32
+ - uses : actions/setup-python@v3
33
33
with :
34
34
python-version : ' 3.x' # Version range or exact version of a Python version to use, using SemVer's version range syntax
35
35
architecture : ' x64' # optional x64 or x86. Defaults to x64 if not specified
46
46
python-version : [ '2.x', '3.x', 'pypy-2.7', 'pypy-3.7', 'pypy-3.8' ]
47
47
name : Python ${{ matrix.python-version }} sample
48
48
steps :
49
- - uses : actions/checkout@v2
49
+ - uses : actions/checkout@v3
50
50
- name : Set up Python
51
- uses : actions/setup-python@v2
51
+ uses : actions/setup-python@v3
52
52
with :
53
53
python-version : ${{ matrix.python-version }}
54
54
architecture : x64
70
70
- os : windows-latest
71
71
python-version : ' 3.6'
72
72
steps :
73
- - uses : actions/checkout@v2
73
+ - uses : actions/checkout@v3
74
74
- name : Set up Python
75
- uses : actions/setup-python@v2
75
+ uses : actions/setup-python@v3
76
76
with :
77
77
python-version : ${{ matrix.python-version }}
78
78
- name : Display Python version
89
89
# in this example, there is a newer version already installed, 3.7.7, so the older version will be downloaded
90
90
python-version : ['3.7.4', '3.8', '3.9', '3.10']
91
91
steps :
92
- - uses : actions/checkout@v2
93
- - uses : actions/setup-python@v2
92
+ - uses : actions/checkout@v3
93
+ - uses : actions/setup-python@v3
94
94
with :
95
95
python-version : ${{ matrix.python-version }}
96
96
- run : python my_script.py
99
99
Download and set up an accurate pre-release version of Python:
100
100
` ` ` yaml
101
101
steps :
102
- - uses : actions/checkout@v2
103
- - uses : actions/setup-python@v2
102
+ - uses : actions/checkout@v3
103
+ - uses : actions/setup-python@v3
104
104
with :
105
105
python-version : ' 3.11.0-alpha.1'
106
106
- run : python my_script.py
@@ -109,8 +109,8 @@ steps:
109
109
Download and set up the latest available version of Python (includes both pre-release and stable versions):
110
110
` ` ` yaml
111
111
steps :
112
- - uses : actions/checkout@v2
113
- - uses : actions/setup-python@v2
112
+ - uses : actions/checkout@v3
113
+ - uses : actions/setup-python@v3
114
114
with :
115
115
python-version : ' 3.11.0-alpha - 3.11.0' # SemVer's version range syntax
116
116
- run : python my_script.py
@@ -129,8 +129,8 @@ jobs:
129
129
- ' pypy-3.7-v7.3.3' # Python 3.7 and PyPy 7.3.3
130
130
- ' pypy-3.8' # the latest available version of PyPy that supports Python 3.8
131
131
steps :
132
- - uses : actions/checkout@v2
133
- - uses : actions/setup-python@v2
132
+ - uses : actions/checkout@v3
133
+ - uses : actions/setup-python@v3
134
134
with :
135
135
python-version : ${{ matrix.python-version }}
136
136
- run : python my_script.py
@@ -224,8 +224,8 @@ The requirements file format allows to specify dependency versions using logical
224
224
225
225
```yaml
226
226
steps:
227
- - uses: actions/checkout@v2
228
- - uses: actions/setup-python@v2
227
+ - uses: actions/checkout@v3
228
+ - uses: actions/setup-python@v3
229
229
with:
230
230
python-version: '3.9'
231
231
cache: 'pip'
@@ -235,10 +235,10 @@ steps:
235
235
** Caching pipenv dependencies:**
236
236
``` yaml
237
237
steps :
238
- - uses : actions/checkout@v2
238
+ - uses : actions/checkout@v3
239
239
- name : Install pipenv
240
240
run : pipx install pipenv
241
- - uses : actions/setup-python@v2
241
+ - uses : actions/setup-python@v3
242
242
with :
243
243
python-version : ' 3.9'
244
244
cache : ' pipenv'
@@ -248,8 +248,8 @@ steps:
248
248
**Using wildcard patterns to cache dependencies**
249
249
` ` ` yaml
250
250
steps :
251
- - uses : actions/checkout@v2
252
- - uses : actions/setup-python@v2
251
+ - uses : actions/checkout@v3
252
+ - uses : actions/setup-python@v3
253
253
with :
254
254
python-version : ' 3.9'
255
255
cache : ' pip'
@@ -260,10 +260,10 @@ steps:
260
260
**Using a list of file paths to cache dependencies**
261
261
` ` ` yaml
262
262
steps :
263
- - uses : actions/checkout@v2
263
+ - uses : actions/checkout@v3
264
264
- name : Install pipenv
265
265
run : pipx install pipenv
266
- - uses : actions/setup-python@v2
266
+ - uses : actions/setup-python@v3
267
267
with :
268
268
python-version : ' 3.9'
269
269
cache : ' pipenv'
0 commit comments