1
1
name : Setup Nox
2
- description : ' Prepares all python versions for nox'
2
+ description : " Prepares all python versions for nox"
3
+ inputs :
4
+ python-versions :
5
+ description : " List of python versions to install"
6
+ required : true
7
+ default : " ['3.7', '3.8', '3.9', '3.10', 'pypy3.7', 'pypy3.8', 'pypy3.9']"
3
8
branding :
4
9
icon : package
5
10
color : blue
@@ -10,27 +15,54 @@ runs:
10
15
- uses : actions/setup-python@v3
11
16
with :
12
17
python-version : " pypy-3.7"
18
+ if : ${{ contains(fromJSON(inputs.python-versions), 'pypy3.7') }}
13
19
- uses : actions/setup-python@v3
14
20
with :
15
21
python-version : " pypy-3.8"
22
+ if : ${{ contains(fromJSON(inputs.python-versions), 'pypy3.8') }}
16
23
- uses : actions/setup-python@v3
17
24
with :
18
25
python-version : " pypy-3.9"
26
+ if : ${{ contains(fromJSON(inputs.python-versions), 'pypy3.9') }}
19
27
28
+ - uses : actions/setup-python@v3
29
+ with :
30
+ python-version : " 2.7"
31
+ if : ${{ contains(fromJSON(inputs.python-versions), '2.7') }}
32
+ - uses : actions/setup-python@v3
33
+ with :
34
+ python-version : " 3.5"
35
+ if : ${{ contains(fromJSON(inputs.python-versions), '3.5') }}
36
+ - uses : actions/setup-python@v3
37
+ with :
38
+ python-version : " 3.6"
39
+ if : ${{ contains(fromJSON(inputs.python-versions), '3.6') }}
20
40
- uses : actions/setup-python@v3
21
41
with :
22
42
python-version : " 3.7"
43
+ if : ${{ contains(fromJSON(inputs.python-versions), '3.7') }}
23
44
- uses : actions/setup-python@v3
24
45
with :
25
46
python-version : " 3.8"
47
+ if : ${{ contains(fromJSON(inputs.python-versions), '3.8') }}
26
48
- uses : actions/setup-python@v3
27
49
with :
28
50
python-version : " 3.9"
51
+ if : ${{ contains(fromJSON(inputs.python-versions), '3.9') }}
29
52
- uses : actions/setup-python@v3
30
53
with :
31
54
python-version : " 3.10"
55
+ # used to install nox
56
+ # if: ${{ contains(fromJSON(inputs.python-versions), '3.10') }}
57
+ - id : nox-python
58
+ run : echo "::set-output name=exe::$(which python)"
59
+ shell : bash
60
+
61
+ - uses : actions/setup-python@v3
62
+ with :
63
+ python-version : " 3.11-dev"
64
+ if : ${{ contains(fromJSON(inputs.python-versions), '3.11') }}
32
65
33
66
- name : " Install nox"
34
- # --python "$(which python)" => always use the last setup-python version to install nox.
35
- run : pipx install --python "$(which python)" '${{ github.action_path }}'
67
+ run : pipx install --python '${{ steps.nox-python.outputs.exe }}' '${{ github.action_path }}'
36
68
shell : bash
0 commit comments