Skip to content

Add Go coverage reporting and codec tests - #61

Merged
Yuta Kurosaki (kurochan) merged 3 commits into
mainfrom
measure-codecoverage
May 27, 2026
Merged

Add Go coverage reporting and codec tests#61
Yuta Kurosaki (kurochan) merged 3 commits into
mainfrom
measure-codecoverage

Conversation

@kurochan

Copy link
Copy Markdown
Member

Add Go coverage reporting for root and ext/* modules, plus codec and noCopy test coverage.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds Go code coverage reporting to the go-test CI workflow (running tests across the root module and each top-level ext/* module, then converting the profile to Cobertura via a new standalone tools module) and broadens unit test coverage for the root codecs (NoopCacheStorageCodec, JSONByteStringCodec, BinaryCompressionCodec) and noCopy. The go-bench workflow is also split off to run on push/PR with explicit -benchtime=1s.

Changes:

  • Replace benchmark-style execution in go-test with -coverprofile runs, generate a Cobertura report via a new tools module, and upload via actions/upload-code-coverage.
  • Add tools/ module (excluded from go.work, built with GOWORK=off) pinning gocover-cobertura, plus Dependabot config and dependabot allowlist entry.
  • Add new tests covering NoopCacheStorageCodec, JSON codec HTML-escape and buffer-release behavior, additional BinaryCompressionCodec edge cases, and noCopy sync.Locker compliance.

Reviewed changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
.github/workflows/go-test.yml Switch to coverage mode, generate Cobertura report, upload coverage.
.github/workflows/go-bench.yml Run benchmarks on push/PR with -benchtime=1s.
.github/dependabot.yml Track gomod updates for new /tools directory.
.github/workflows/dependabot-allowed-dependencies.txt Allow actions/upload-code-coverage auto-merges.
tools/go.mod New module declaring gocover-cobertura as a Go tool.
tools/go.sum Checksums for the new tools module.
codec_test.go Add Noop/JSON/BinaryCompression codec coverage tests.
nocopy_test.go Add sync.Locker assertion and Lock/Unlock test for noCopy.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@kurochan
Yuta Kurosaki (kurochan) marked this pull request as ready for review May 27, 2026 09:25
@github-code-quality

Copy link
Copy Markdown

Code Coverage Overview

Languages: Go

Go / code-coverage/go-test

The overall coverage in the measure-codecoverage branch is 68%. The coverage in the main branch is 78%.

Show a code coverage summary of the most impacted files.
File main 9f46bfd measure-codecoverage b391caa +/-
cache.go 100% 99% -1%
internal/proto/...he_object.pb.go 0% 0% 0%
internal/proto/...ject_test.pb.go 0% 0% 0%
provider.go 100% 100% 0%
codec.go 87% 92% +5%
cache_provider.go 0% 98% +98%
nocopy.go 0% 100% +100%

Code Coverage is in Public Preview. Learn more and provide us with your feedback.

@kurochan
Yuta Kurosaki (kurochan) merged commit 000a2f9 into main May 27, 2026
9 checks passed
@kurochan
Yuta Kurosaki (kurochan) deleted the measure-codecoverage branch May 27, 2026 09:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants