File tree 1 file changed +28
-34
lines changed
1 file changed +28
-34
lines changed Original file line number Diff line number Diff line change 10
10
- main
11
11
12
12
jobs :
13
+ pre :
14
+ name : pre
15
+ runs-on : ubuntu-22.04
16
+ outputs :
17
+ matrix : ${{ steps.generate_matrix.outputs.matrix }}
18
+ steps :
19
+ - name : Determine matrix
20
+ id : generate_matrix
21
+ uses : coactions/matrix@main
22
+ with :
23
+ other_names : |
24
+ lint
25
+ packaging
26
+ docs
13
27
build :
14
28
name : ${{ matrix.name }}
15
- runs-on : ${{ matrix.os || 'ubuntu-latest' }}
29
+ needs : pre
30
+ runs-on : ${{ matrix.os || 'ubuntu-22.04' }}
16
31
17
32
strategy :
18
33
fail-fast : false
19
- matrix :
20
- include :
21
- - name : docs
22
- python : " 3.10"
23
- tox_env : docs
24
- - name : " lint"
25
- python : " 3.10"
26
- tox_env : " lint"
27
- - name : " packaging"
28
- python : " 3.10"
29
- tox_env : " packaging"
30
-
31
- - name : py37
32
- python : " 3.7"
33
- tox_env : py37
34
- - name : py38
35
- python : " 3.8"
36
- tox_env : py38
37
- - name : py39
38
- python : " 3.9"
39
- tox_env : py39
40
- - name : py310
41
- python : " 3.10"
42
- tox_env : py310
43
- - name : py311
44
- python : " ~3.11.0-0" # see https://github.com/actions/setup-python/issues/213#issuecomment-1146676713
45
- tox_env : py311
34
+ matrix : ${{ fromJson(needs.pre.outputs.matrix) }}
46
35
47
36
steps :
48
37
- uses : actions/checkout@v3
49
- - name : Set up Python ${{ matrix.python }}
38
+ with :
39
+ fetch-depth : 0 # needed by setuptools-scm
40
+
41
+ - name : Set up Python ${{ matrix.python_version }}
50
42
uses : actions/setup-python@v4
51
43
with :
52
- python-version : ${{ matrix.python }}
44
+ python-version : ${{ matrix.python_version }}
45
+
53
46
- name : Install dependencies
54
47
run : |
55
48
python -m pip install --upgrade pip
56
- pip install tox
57
- - name : Test
58
- run : " tox -e ${{ matrix.tox_env }}"
49
+ pip install tox>=4.0
50
+
51
+ - name : tox run -e ${{ matrix.passed_name }}
52
+ run : tox run -e ${{ matrix.passed_name }}
59
53
60
54
check : # This job does nothing and is only used for the branch protection
61
55
if : always()
62
56
needs :
63
57
- build
64
- runs-on : ubuntu-latest
58
+ runs-on : ubuntu-22.04
65
59
steps :
66
60
- name : Decide whether the needed jobs succeeded or failed
67
61
uses : re-actors/alls-green@release/v1
You can’t perform that action at this time.
0 commit comments