19
19
FORCE_COLOR : " 1"
20
20
21
21
jobs :
22
- nox-lint :
23
- runs-on : ubuntu-latest
24
- defaults :
25
- run :
26
- working-directory : antsibull-docs-parser
27
- steps :
28
- - name : Check out antsibull-docs-parser
29
- uses : actions/checkout@v4
30
- with :
31
- path : antsibull-docs-parser
32
- - name : Setup nox
33
-
34
- with :
35
- python-versions : " 3.11"
36
- - run : |
37
- nox -v -e lint
38
- nox-test :
22
+ nox :
39
23
runs-on : ubuntu-latest
40
24
defaults :
41
25
run :
42
26
working-directory : antsibull-docs-parser
27
+ strategy :
28
+ fail-fast : false
29
+ matrix :
30
+ include :
31
+ - session : test
32
+ python-versions : " 3.7, 3.8, 3.9, 3.10, 3.11, 3.12"
33
+ other-args : " -p 3.7 3.8 3.9 3.10 3.11 3.12"
34
+ codecov : true
35
+ packages : " "
36
+
37
+ - session : lint
38
+ python-versions : " 3.12"
39
+ other-args : " "
40
+ codecov : false
41
+ packages : " "
42
+
43
+ - session : create_vectors
44
+ python-versions : " 3.12"
45
+ other-args : " "
46
+ codecov : false
47
+ packages : " "
48
+ name : " Run nox ${{ matrix.session }} session"
43
49
steps :
44
50
- name : Check out antsibull-docs-parser
45
51
uses : actions/checkout@v4
46
52
with :
47
53
path : antsibull-docs-parser
54
+ - name : Install extra packages
55
+ if : " matrix.packages != ''"
56
+ run : |
57
+ sudo apt-get install -y ${{ matrix.packages }}
48
58
- name : Setup nox
49
59
50
60
with :
51
- python-versions : " 3.7, 3.8, 3.9, 3.10, 3.11"
52
- - name : Run unit tests
61
+ python-versions : " ${{ matrix.python-versions }}"
62
+ - name : Set up nox environments
63
+ run : |
64
+ nox -v -e "${{ matrix.session }}" ${{ matrix.other-args }} --install-only
65
+ ${{ matrix.codecov && 'nox -v -e coverage --install-only' || '' }}
66
+ - name : " Run nox -e ${{ matrix.session }} ${{ matrix.other-args }}"
53
67
run : |
54
- nox -v -e test -p 3.7 3.8 3.9 3.10 3.11
68
+ nox -v -e "${{ matrix.session }}" ${{ matrix.other-args }} --reuse-existing-virtualenvs --no-install
55
69
- name : Report coverage
70
+ if : ${{ matrix.codecov }}
56
71
run : |
57
- nox -v -e coverage
72
+ nox -v -e coverage --reuse-existing-virtualenvs --no-install
58
73
- name : Upload coverage
74
+ if : ${{ matrix.codecov }}
59
75
uses : codecov/codecov-action@v3
60
76
with :
61
- name : nox-test
62
77
directory : antsibull-docs-parser
78
+ name : " ${{ matrix.session }}"
63
79
env :
64
80
CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
65
81
nox-test-36 :
@@ -82,32 +98,20 @@ jobs:
82
98
- name : Setup nox - downgrade virtualenv
83
99
run : |
84
100
pipx inject nox 'virtualenv<20.22.0'
101
+ - name : Set up nox environments
102
+ run : |
103
+ nox -v -e test -p 3.6 --install-only
104
+ nox -v -e coverage --install-only
85
105
- name : Run unit tests
86
106
run : |
87
- nox -v -e test -p 3.6
107
+ nox -v -e test -p 3.6 --reuse-existing-virtualenvs --no-install
88
108
- name : Report coverage
89
109
run : |
90
- nox -v -e coverage
110
+ nox -v -e coverage --reuse-existing-virtualenvs --no-install
91
111
- name : Upload coverage
92
112
uses : codecov/codecov-action@v3
93
113
with :
94
114
name : nox-test-36
95
115
directory : antsibull-docs-parser
96
116
env :
97
117
CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
98
- nox-vectors :
99
- runs-on : ubuntu-latest
100
- defaults :
101
- run :
102
- working-directory : antsibull-docs-parser
103
- steps :
104
- - name : Check out antsibull-docs-parser
105
- uses : actions/checkout@v4
106
- with :
107
- path : antsibull-docs-parser
108
- - name : Setup nox
109
-
110
- with :
111
- python-versions : " 3.11"
112
- - run : |
113
- nox -v -e create_vectors
0 commit comments