Commit b13d801
committed
ci: derive the kinds from the matrix, normalize paths, lint both template spellings
Three fixes from review on 5b7e8b6.
The kind list was hardcoded in three loops with nothing tying it to the jobs. Adding
a fourth job with its matrix key and its MATRIX_KEYS entry while missing one of those
loops wrote no output line for it, and `!= '[]'` is true for the empty string — so
that job would start and die in fromJSON(''), the exact failure emit_all's comment
describes. The loops now come from `jq -r 'keys_unsorted[]'` over the matrix file, and
refuse to emit anything if that yields nothing. The guard's kind check became
bidirectional to close the other direction: a kind a job reads but the file does not
have is now reported, not just a key no job consumes.
`directories` values are normalized when collected. Dependabot resolves
"/examples/fastapi/app/" and "/examples/fastapi/app" to the same manifest, but
comparing verbatim reported the entry as pointing at no manifest *and* the manifest
as having no entry — two contradictory problems for a config that works, the failure
already fixed here for the singular `directory` key and for globs. Stripping only
slashes leaves glob patterns alone, and the duplicate check now also sees
`/examples/x` against `/examples/x/` as the collision Dependabot rejects the file
over.
The validate job lints template.yml as well as template.yaml. examples/sinatra and
examples/go-http-zip use the .yml spelling, so 43 of 45 templates were linted and
those two were not — while examples-verified claimed "template validation only" for
them. Both have Dependabot entries and no matrix entry, so that claim was the only
thing their pull requests were going to get, and it was false.
Exercised: a trailing-slash entry now passes; a slashed and unslashed pair of the
same directory is reported as a duplicate; a matrix missing a kind a job reads, and a
matrix with a kind no job reads, both fail; a fourth kind in the file gets its output
line; an unreadable matrix refuses rather than emitting an empty selection; and the
twelve-state guard suite plus three selector paths still behave.1 parent 5b7e8b6 commit b13d801
3 files changed
Lines changed: 43 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
127 | | - | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
128 | 139 | | |
129 | | - | |
| 140 | + | |
130 | 141 | | |
131 | 142 | | |
132 | 143 | | |
| |||
305 | 316 | | |
306 | 317 | | |
307 | 318 | | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
308 | 322 | | |
309 | 323 | | |
310 | 324 | | |
311 | 325 | | |
312 | 326 | | |
313 | 327 | | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
314 | 334 | | |
315 | 335 | | |
316 | 336 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
30 | 42 | | |
31 | 43 | | |
32 | 44 | | |
33 | 45 | | |
34 | 46 | | |
35 | 47 | | |
36 | 48 | | |
37 | | - | |
| 49 | + | |
38 | 50 | | |
39 | 51 | | |
40 | 52 | | |
| |||
112 | 124 | | |
113 | 125 | | |
114 | 126 | | |
115 | | - | |
| 127 | + | |
116 | 128 | | |
117 | 129 | | |
118 | 130 | | |
| |||
138 | 150 | | |
139 | 151 | | |
140 | 152 | | |
141 | | - | |
| 153 | + | |
142 | 154 | | |
143 | 155 | | |
144 | 156 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
109 | | - | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
110 | 115 | | |
111 | 116 | | |
112 | 117 | | |
| |||
0 commit comments