You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since #3824 was fixed (PR #3825), Submodule-Unit-Testing does produce submodule-coverage-reports. Two problems remain downstream of that, and the net effect is that submodule coverage still does not reach the reported number — it is now generated, uploaded three times, and read by nothing.
1. The submodule artifact has no matrix guard, so it is uploaded once per Go version
Example-Unit-Testing and PKG-Unit-Testing both gate their upload:
- name: Upload Test Coverageif: ${{ matrix.go-version == '1.24'}}
Submodule-Unit-Testing (.github/workflows/go.yml:381) has no such gate, so all three legs upload under the same name. From run 31266842627:
— in parse_coverage (go.yml:277) and again in upload_coverage (go.yml:422). Neither job needs: the submodule job either, so parse_coverage doesn't even see the artifact; its log for the run above reads:
It started at 16:27:02, before two of the three submodule uploads had finished. So the 86.2% published to qlty excludes every module under pkg/gofr/datasource/* — 27 submodules — while appearing to be a whole-repo figure.
upload_coverage has the same two-file merge, so the same gap reaches qlty on development pushes.
CODE_COVERAGE is written to $GITHUB_ENV and read by nobody — its only consumer, the 92% threshold gate, is commented out directly below at go.yml:288-292. The job's entire output is one echo line in a log. It also runs go tool cover with no actions/setup-go step, so it silently depends on whatever Go the ubuntu-latest image happens to ship.
Expected
One submodule-coverage-reports artifact per run, not three.
parse_coverage and upload_coverageneeds: the submodule job and merge its profiles, so the published percentage covers the submodules.
parse_coverage either gets its threshold gate back (making it a real gate) or is folded into upload_coverage and deleted.
An explicit setup-go wherever go tool cover runs.
Caveats for whoever takes this
Merging submodule coverage in will move the reported number, possibly down, since the datasource modules were never counted. That is the correct number, but expect the qlty delta to look alarming on the PR that lands it.
-coverpkg=./... is per-module in the submodule job, so the merged profile will contain entries from several modules — worth checking qlty coverage publish --strip-prefix still resolves paths for them.
Summary
Since #3824 was fixed (PR #3825),
Submodule-Unit-Testingdoes producesubmodule-coverage-reports. Two problems remain downstream of that, and the net effect is that submodule coverage still does not reach the reported number — it is now generated, uploaded three times, and read by nothing.1. The submodule artifact has no matrix guard, so it is uploaded once per Go version
Example-Unit-TestingandPKG-Unit-Testingboth gate their upload:Submodule-Unit-Testing(.github/workflows/go.yml:381) has no such gate, so all three legs upload under the same name. From run 31266842627:Three artifacts, same name, identical size.
actions/upload-artifact@v7permits the duplicate names (v4 would have 409'd), so nothing complains.2. Nothing consumes it
Both merge steps hardcode two paths:
— in
parse_coverage(go.yml:277) and again inupload_coverage(go.yml:422). Neither jobneeds:the submodule job either, soparse_coveragedoesn't even see the artifact; its log for the run above reads:It started at 16:27:02, before two of the three submodule uploads had finished. So the 86.2% published to qlty excludes every module under
pkg/gofr/datasource/*— 27 submodules — while appearing to be a whole-repo figure.upload_coveragehas the same two-file merge, so the same gap reaches qlty ondevelopmentpushes.3.
parse_coverageis decorativeCODE_COVERAGEis written to$GITHUB_ENVand read by nobody — its only consumer, the 92% threshold gate, is commented out directly below atgo.yml:288-292. The job's entire output is oneecholine in a log. It also runsgo tool coverwith noactions/setup-gostep, so it silently depends on whatever Go theubuntu-latestimage happens to ship.Expected
submodule-coverage-reportsartifact per run, not three.parse_coverageandupload_coverageneeds:the submodule job and merge its profiles, so the published percentage covers the submodules.parse_coverageeither gets its threshold gate back (making it a real gate) or is folded intoupload_coverageand deleted.setup-gowherevergo tool coverruns.Caveats for whoever takes this
-coverpkg=./...is per-module in the submodule job, so the merged profile will contain entries from several modules — worth checkingqlty coverage publish --strip-prefixstill resolves paths for them.matrix.go-version == '1.24'gate should move to the version that actually runs; whichever gate the submodule upload gets should use the same one, so this doesn't need fixing twice.Context
Found while reviewing run 31266842627. Downstream of #3824 / #3825; related to #3859.