-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DRAFT : Adding functionality to post code coverage #5
base: main
Are you sure you want to change the base?
Conversation
1. Adds a enum to specify which files should show warnings using Danger 2. Add code to generates list of file names from the options 3. Add code to filter warning issues based on file names list generate above.
1. adds 'failIfCoverageUnavailable' to allow user to fail the build if coverage is'nt avaiable 2. adds 'excludeCoverageTarget' to allow the user to filter out specific targets like pods or tests 3. adds 'showCoverageForChangedFiles' to allow user to show coverage for code changes and 'excludeCoverageForFiles' to exclude specific files 4. add code to support the above config vairables we first filter out the exculded targets, then exludedFiles. After which we proceed to post the Overall coverage following the coverage for diff files grouped by target. yumemi-inc#4
@theScud Sorry, please let me review it at weekend! Still busy on company work |
no worries i still need to test this out, please take your time |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@theScud Please have a look!
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nits]
Please don't remove these blank lines. I made them for better readability.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cool, would it possible to have a swift format file to the repo, would make it easier to make sure that we stick to convention without any misses
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will add it later this week 👍
reportingFileType: ReportingFileType = .all | ||
excludeCoverageTarget: [ExcludedTarget] = [], | ||
excludeCoverageForFiles: @escaping ((RelativeFilePath) -> Bool) = { _ in return false }, | ||
showCoverageForChangedFiles: Bool = true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[must]
I Think it's probably too complicated now.
shouldFailIfCoverageUnavailable
is only needed when codeCoverageRequirement
is .required
, but it's required even when codeCoverageRequirement
is .none
Also excludeCoverageForFiles
and showCoverageForChangedFiles
are kind of ambiguous that users may feel difficult to determine what exactly they're doing.
My suggestion is
- Make a new
CodeCoverageReportSettings
type - Move
CoverageThreshold
into that type - Make properties like
excludeCoverageTargets
inside that type - Make a
default
initializer forCodeCoverageReportSettings
- Change
CodeCoverageRequirement.required(CoverageThreshold)
toCodeCoverageRequirement.required(CodeCoverageReportSettings)
Properties like parseBuildWarnings
and parseBuildErrors
may also be moved to another BuildSummaryReportSettings
type, but that would be another ticket to fix
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure, i'll make the changes
@el-hoshino i am a little tied up with work currently , i'll post the changes in the first week of November, apologies for the delay |
@theScud Don't worry! Actually I'm also occupied until end of this month; by then I may not be able to review your PR soon either 😅 |
DO NOT MERGE, current in testing.