Commit a683e9a
test: add test coverage script (#1014)
This PR adds a new test coverage script and corresponding Makefile
target to improve visibility into code coverage metrics. The script
provides a flexible way to generate coverage reports with optional HTML
output.
Easy to diff:
````
% diff coverage.before coverage.after
14c14
< ok oras.land/oras/cmd/oras/internal/display/metadata/text (cached) coverage: 31.5% of statements
---
> ok oras.land/oras/cmd/oras/internal/display/metadata/text 0.270s coverage: 41.4% of statements
155,157c155,157
< oras.land/oras/cmd/oras/internal/display/metadata/text/attach.go:36: NewAttachHandler 0.0%
< oras.land/oras/cmd/oras/internal/display/metadata/text/attach.go:43: OnAttached 0.0%
< oras.land/oras/cmd/oras/internal/display/metadata/text/attach.go:56: Render 0.0%
---
> oras.land/oras/cmd/oras/internal/display/metadata/text/attach.go:36: NewAttachHandler 100.0%
> oras.land/oras/cmd/oras/internal/display/metadata/text/attach.go:43: OnAttached 100.0%
> oras.land/oras/cmd/oras/internal/display/metadata/text/attach.go:56: Render 100.0%
663c663
< total: (statements) 34.8%
---
> total: (statements) 35.1%
````
---------
Signed-off-by: Terry Howe <terrylhowe@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>1 parent 160e466 commit a683e9a
2 files changed
+59
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
18 | 24 | | |
19 | 25 | | |
20 | 26 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
0 commit comments