@@ -123,6 +123,8 @@ Whether this check decided that the job matrix succeeded.
123
123
124
124
## Gotchas
125
125
126
+ ### Experimental matrix jobs
127
+
126
128
An attentive reader may have noticed that there is no clear way to
127
129
allow failures for specific job generated by matrixes in a simple
128
130
manner, through action inputs. This is due to the fact that those
@@ -174,6 +176,40 @@ jobs:
174
176
...
175
177
```
176
178
179
+ ### Displaying the overall workflow result
180
+
181
+ The GitHub commit and pull-request checks will still display as if the workflows
182
+ have failed (the red cross on the checks). To clarify the actual status of the
183
+ workflow taking into account [ experimental matrix jobs] and ` allowed-failures `
184
+ you can do two things:
185
+
186
+ #### Display the workflow badge
187
+
188
+ See the [ github documentation] [ workflow-badge-doc ] about how to include the
189
+ workflow status on the top-level README page. Simply point this to the workflow
190
+ that runs the alls-green action, e.g.:
191
+ ``` markdown
192
+ 
193
+ ```
194
+
195
+ #### Masking the check results
196
+
197
+ If you know the exact step that may fail, you can use
198
+ [ ` steps[*].continue-on-error ` ] to mask the job's result, e.g.:
199
+ ``` yaml
200
+ jobs :
201
+ tests :
202
+ runs-on : ubuntu-latest
203
+ matrix :
204
+ python-version : [ "3.11", "3.x" ]
205
+ includes :
206
+ - python-version : " 3.x"
207
+ experimental : true
208
+ steps :
209
+ - uses : actions/checkout@v5
210
+ - runs : do-test
211
+ continue-on-error : ${{ github.event_name == 'push' && matrix.experimental}}
212
+ ` ` `
177
213
178
214
## Does anybody actually use this?
179
215
@@ -210,6 +246,7 @@ The contents of this project is released under the
210
246
[BSD 3-clause license].
211
247
212
248
249
+ [`steps[*].continue-on-error`] : https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepscontinue-on-error
213
250
[aiohttp] : https://github.com/aio-libs/aiohttp
214
251
[Ansible] : https://github.com/ansible
215
252
[Ansible Collections] : https://github.com/ansible-collections
@@ -218,6 +255,7 @@ The contents of this project is released under the
218
255
[BSD 3-clause license] : LICENSE.md
219
256
[conda] : https://github.com/conda/conda
220
257
[coveragepy] : https://github.com/nedbat/coveragepy
258
+ [experimental matrix jobs] : # experimental-matrix-jobs
221
259
[forum:check] :
222
260
https://github.com/orgs/community/discussions/26733#discussioncomment-3253151
223
261
[gating] : https://gating.dev
@@ -228,6 +266,7 @@ https://github.com/orgs/community/discussions/26733#discussioncomment-3253151
228
266
[spaceship-prompt] : https://github.com/spaceship-prompt/spaceship-prompt
229
267
[structlog] : https://github.com/hynek/structlog
230
268
[Towncrier] : https://github.com/twisted/towncrier
269
+ [workflow-badge-doc] : https://docs.github.com/en/actions/monitoring-and-troubleshooting-workflows/adding-a-workflow-status-badge
231
270
[Zuul] : https://zuul-ci.org
232
271
[@aio-libs] : https://github.com/aio-libs
233
272
[@CherryPy] : https://github.com/cherrypy
0 commit comments