TL;DR This PR allows the subdir and rootdir options to be used for all types of coverage generation, and always applies the option to the file paths, whether the umbrella flag is true or not.
The context for the change is that we (@duffelhq) have an umbrella application, but during CI runs tests for each app are run in parallel using mix cmd. We wanted to be able to append the app path (e.g. apps/example) to the relative path (e.g. lib/file.exs). However, this option was only available when using coveralls.post, so this PR allows it for all types. We use CircleCI, but I reckon this'd be useful for any CI server, and even when using json or local.
The subdir and rootdir were also previously only used when passing the umbrella flag - I've also made an update to respect these flags whether using umbrella or not.
Any suggestions on alternative methods welcome - I did consider incuding another setting, something like base_reporting_path, but it seemed like subdir/rootdir were what I was looking for. I may be missing some context, however.
Coverage decreased (-0.02%) to 90.467% when pulling 7665099249155b8ec11bdb8c9486a01cba63aa27 on duffelhq:always-allow-subdir-rootdir into d715fb219de5ff4b77fe0cad4bdaa75352c11a8a on parroty:master.
Hi,
TL;DR This PR allows the
subdir
androotdir
options to be used for all types of coverage generation, and always applies the option to the file paths, whether theumbrella
flag is true or not.The context for the change is that we (@duffelhq) have an umbrella application, but during CI runs tests for each app are run in parallel using
mix cmd
. We wanted to be able to append the app path (e.g. apps/example) to the relative path (e.g. lib/file.exs). However, this option was only available when usingcoveralls.post
, so this PR allows it for all types. We use CircleCI, but I reckon this'd be useful for any CI server, and even when usingjson
orlocal
.The subdir and rootdir were also previously only used when passing the
umbrella
flag - I've also made an update to respect these flags whether using umbrella or not.Any suggestions on alternative methods welcome - I did consider incuding another setting, something like
base_reporting_path
, but it seemed like subdir/rootdir were what I was looking for. I may be missing some context, however.