allow subdir and rootdir to be applied to all tasks and always apply to paths #289
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.