Commit 200a08e
ci: add GitHub Code Quality coverage (Python + Go) alongside Codecov (#4308)
Add actions/upload-code-coverage steps next to the existing Codecov
uploads in code-quality.yaml so coverage also lands in GitHub's native
Code Quality view on PRs. Python reuses the pytest-cov coverage.xml; Go
converts coverage-go.out to Cobertura via gocover-cobertura (GitHub's
documented recipe). Both are non-blocking (fail-on-error: false) and the
action self-skips fork PRs and merge_group runs. Adds code-quality:write
to the pytest-tests and go-tests jobs.
* ci: harden GitHub Code Quality coverage steps (review feedback)
- Guard both upload-code-coverage steps against a script injection in the
action's push path (it interpolates github.ref_name/github.ref into a
shell run:); skip the upload when the branch name contains $ ` " \ .
- Make the Go Cobertura conversion non-blocking (continue-on-error) and gate
the Go upload on its success, so optional coverage tooling can't fail the
go-tests job.
- Check out the PR head (head.sha) in both coverage jobs so reports map to the
commit the action attributes them to (matches the action's README example).
* ci: drop ref_name metachar guard; track upstream injection instead
The guard was security theater: the injection in actions/upload-code-coverage
is only reachable via push/workflow_dispatch to trusted branches, which already
require write access (= arbitrary CI execution). Replace the denylist with a
note linking the upstream report (actions/upload-code-coverage#26); the real
fix (inject via env:) belongs there.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* ci(code-quality): set persist-credentials:false on the go-tests checkout
Matches every other checkout in this workflow; the go-tests job now has
code-quality:write, so don't leave the token in .git/config for PR code to
reuse. The job only fetches public Go modules, so it needs no persisted creds.
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 5b6777f commit 200a08e
1 file changed
Lines changed: 56 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
| 81 | + | |
81 | 82 | | |
82 | 83 | | |
83 | 84 | | |
84 | 85 | | |
85 | 86 | | |
86 | 87 | | |
87 | 88 | | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
88 | 93 | | |
89 | 94 | | |
90 | 95 | | |
| |||
142 | 147 | | |
143 | 148 | | |
144 | 149 | | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
145 | 172 | | |
146 | 173 | | |
147 | 174 | | |
| |||
153 | 180 | | |
154 | 181 | | |
155 | 182 | | |
| 183 | + | |
156 | 184 | | |
157 | 185 | | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
158 | 190 | | |
159 | 191 | | |
160 | 192 | | |
| |||
174 | 206 | | |
175 | 207 | | |
176 | 208 | | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
177 | 223 | | |
178 | 224 | | |
179 | 225 | | |
| |||
184 | 230 | | |
185 | 231 | | |
186 | 232 | | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
187 | 243 | | |
188 | 244 | | |
189 | 245 | | |
| |||
0 commit comments