mfridman/tparse

Drop dependency on gocover.io

mfridman opened this issue · 1 comments

Need to come up with another solution for displaying a coverage badge.

Screen Shot 2020-09-13 at 11 15 17 PM

It's broken more often that I'd like it to be. (btw https://gocover.io is an awesome idea and kudos to the maintainer for all these years)

Not that it really matters, but I'm thinking we could do something cool.

A bit ambitious but lets see how far we can roll with this idea...

https://bestofgo.dev reports ~14k repos with >=50 stars (yay we fall above the threshold). What if we took top repos that were updated, say within the last 6 months, and automatically ran a "tparse" report. Run this periodically.

We can maintain a trend of "tests" over-time .. and in the process enable a latest "coverage" badge.

bestofgo.dev/coverage/{owner}/{repo}

go test -race -count=1 ./parse -json -cover | go run main.go

+--------+---------+---------------------------+---------+
| STATUS | ELAPSED |           TEST            | PACKAGE |
+--------+---------+---------------------------+---------+
| PASS   |    0.00 | TestAll                   | log     |
| PASS   |    0.00 | TestOutput                | log     |
| PASS   |    0.00 | TestOutputRace            | log     |
| PASS   |    0.00 | TestFlagAndPrefixSetting  | log     |
| PASS   |    0.00 | TestUTCFlag               | log     |
| PASS   |    0.00 | TestEmptyPrintCreatesLine | log     |
| PASS   |    0.00 | ExampleLogger             | log     |
| PASS   |    0.00 | ExampleLogger_Output      | log     |
+--------+---------+---------------------------+---------+

+--------+---------+---------+-------+------+------+------+
| STATUS | ELAPSED | PACKAGE | COVER | PASS | FAIL | SKIP |
+--------+---------+---------+-------+------+------+------+
| PASS   | 0.22s   | log     | 66.7% |    8 |    0 |    0 |
+--------+---------+---------+-------+------+------+------+

I wonder if we could also display this to the user so they don't have to run this in their CI or locally.

Obviously this is outside the realm of this repo. But, some food for thought.

No bandwidth for this. Closing for now.