jefffhaynes / BinarySerializer

A declarative serialization framework for controlling formatting of data at the byte and bit level using field bindings, converters, and code.
MIT License
290 stars 62 forks source link

Add code-coverage #218

Closed bevanweiss closed 1 year ago

bevanweiss commented 1 year ago

Add code coverage metrics on pull requests.

The irongut action requires docker, hence the change to Ubuntu runner. When executing against the Ubuntu running the two test cases failed due to path separate '\' instead of '/', so used Path.Combine to make this platform agnostic.

It might be worth having another job for test execution under Windows also, although I think this would only really capture issues with test logic (like the path delimiter issue above). Another possibility might be to have an Ubuntu docker QEMU instance emulation of a Big Endian architecture to potentially test for issues around Big/Little endian logic (in regards to execution platform).

jefffhaynes commented 1 year ago

Is this only failing b/c it isn't merged?

bevanweiss commented 1 year ago

Is this only failing b/c it isn't merged?

I'm actually not entirely sure. The issue is the little code coverage 'swatch' that gets added to the Pull Request needs write permissions to the PR. And there's some rules about when a workflow can get elevated permissions. It suggests workflows from forked repo's (or external) can never get write permissions.

image

What might be the cleanest, is I'll modify this pull to drop the actual usage of the write permissions. This means it won't show the nice little code coverage summary on each pull request... but it should just work. Then in a subsequent PR I can just add in the code coverage summary, and if the workflow now had the write permissions from the previous PR then it should also just work..