Loading
feat(go-test): aggregate coverage across multiple integration jobs
Makes post-test:go:coverage merge coverage from multiple integration jobs into one total + threshold gate, closing the last gap before multi-job adopters (e.g. artifact-registry/UAR) can drop their post-test:go:coverage patch.
Closes team-tasks#4559 (closed). Follows mft!34 (extensible .test:go:integration base).
What changed (templates/go-test.yml)
- Glob merge — the coverage job now merges every
coverage-integration*.txtprofile it receives, not just the singlecoverage-integration.txt. Backward-compatible: the default single-file case is unchanged. - Referenceable default
needs— extracted to a hidden.go-coverage-needs; the coverage job references it via!reference. Consumers with extra integration jobs add them toneedswithout re-listing the defaults.
How a consumer uses it
Each extra integration job writes a distinct coverage-integration-<name>.txt (as an artifact), then:
post-test:go:coverage:
needs:
- !reference [.go-coverage-needs, needs]
- job: "test:go:integration:redis"
optional: trueDocumented in templates/README.md (single-job and multi-job examples).
Validation
- Component tests: new
merge: multiple integrationscenario (three profiles → one total); existing scenarios green. - Canary-validated end-to-end in release-platform-canary against this branch's commit — two extra integration jobs writing distinct profiles + the
!referenceneeds override → coverage job merged all three:Pipeline: release-platform-canary #2649098615.Found integration coverage: coverage-integration-alpha.txt coverage-integration-beta.txt coverage-integration.txt Total coverage: 44.7%
Edited by Jay McCure