-
Notifications
You must be signed in to change notification settings - Fork 49
Add support for codecov.io code coverage reporting. #117
Add support for codecov.io code coverage reporting. #117
Conversation
@johlju @PlagueHO Please take a look when you have a chance. To be clear, each repo will have to go enable this. |
001c1c8
to
bf14cdc
Compare
a2259ca
to
a438d40
Compare
a438d40
to
eb0df2c
Compare
ac85fdc
to
f0e1a0b
Compare
Added documentation on deployment and tested with this PR: TravisEz13/xWindowsUpdate#4 |
This looks cool! 👍 |
Reviewed 3 of 4 files at r1, 2 of 2 files at r2. AppVeyor.psm1, line 242 at r2 (raw file):
Whitespace after if: AppVeyor.psm1, line 244 at r2 (raw file):
Whitespace after if: AppVeyor.psm1, line 252 at r2 (raw file):
Change to Single quotes AppVeyor.psm1, line 257 at r2 (raw file):
Change to upper F in README.md, line 253 at r2 (raw file):
If this gets enabled for a repo when using Default model. Is this something that needs to be changed (dsiabled) when repo is switching to the Harness model? README.md, line 260 at r2 (raw file):
No need to enable CodeCode.IO when using Harness model? DscResource.CodeCoverage/CodeCovIo.psm1, line 7 at r2 (raw file):
Wrong parameter name here, missing an 's' DscResource.CodeCoverage/CodeCovIo.psm1, line 24 at r2 (raw file):
Change to DscResource.CodeCoverage/CodeCovIo.psm1, line 33 at r2 (raw file):
DscResource.CodeCoverage/CodeCovIo.psm1, line 37 at r2 (raw file):
DscResource.CodeCoverage/CodeCovIo.psm1, line 42 at r2 (raw file):
Whitespace after foreach DscResource.CodeCoverage/CodeCovIo.psm1, line 45 at r2 (raw file):
Whitespace after if DscResource.CodeCoverage/CodeCovIo.psm1, line 50 at r2 (raw file):
Whitespace after if DscResource.CodeCoverage/CodeCovIo.psm1, line 57 at r2 (raw file):
Whitespace after if DscResource.CodeCoverage/CodeCovIo.psm1, line 85 at r2 (raw file):
Change to DscResource.CodeCoverage/CodeCovIo.psm1, line 86 at r2 (raw file):
Missing a type here. DscResource.CodeCoverage/CodeCovIo.psm1, line 89 at r2 (raw file):
DscResource.CodeCoverage/CodeCovIo.psm1, line 93 at r2 (raw file):
DscResource.CodeCoverage/CodeCovIo.psm1, line 101 at r2 (raw file):
Whitespace after foreach Are the property named 'file' and not 'File' (upper 'F')? DscResource.CodeCoverage/CodeCovIo.psm1, line 109 at r2 (raw file):
Whitespace after foreach Are the property named 'file' and not 'File' (upper 'F')? DscResource.CodeCoverage/CodeCovIo.psm1, line 122 at r2 (raw file):
Two whitespaces after DscResource.CodeCoverage/CodeCovIo.psm1, line 125 at r2 (raw file):
Two whitespaces after DscResource.CodeCoverage/CodeCovIo.psm1, line 135 at r2 (raw file):
Whitespace after foreach DscResource.CodeCoverage/CodeCovIo.psm1, line 144 at r2 (raw file):
Whitespace after if DscResource.CodeCoverage/CodeCovIo.psm1, line 151 at r2 (raw file):
Whitespace after if DscResource.CodeCoverage/CodeCovIo.psm1, line 157 at r2 (raw file):
Minor: Add a whitespace between DscResource.CodeCoverage/CodeCovIo.psm1, line 158 at r2 (raw file):
Same here. DscResource.CodeCoverage/CodeCovIo.psm1, line 160 at r2 (raw file):
Use comment block <# #>
DscResource.CodeCoverage/CodeCovIo.psm1, line 162 at r2 (raw file):
Whitespace after if DscResource.CodeCoverage/CodeCovIo.psm1, line 167 at r2 (raw file):
Spaces around the equal sign. DscResource.CodeCoverage/CodeCovIo.psm1, line 171 at r2 (raw file):
Whitespace after for. Minor: Spaces around the equal sign. DscResource.CodeCoverage/CodeCovIo.psm1, line 175 at r2 (raw file):
Whitespace after switch. DscResource.CodeCoverage/CodeCovIo.psm1, line 180 at r2 (raw file):
Could we write out what 'cc' means? DscResource.CodeCoverage/CodeCovIo.psm1, line 187 at r2 (raw file):
Could we write out what 'cc' means? DscResource.CodeCoverage/CodeCovIo.psm1, line 194 at r2 (raw file):
Could we write out what 'cc' means? DscResource.CodeCoverage/CodeCovIo.psm1, line 205 at r2 (raw file):
Use comment block <# #> DscResource.CodeCoverage/CodeCovIo.psm1, line 212 at r2 (raw file):
Two whitespaces between 'and' and 'misses' DscResource.CodeCoverage/CodeCovIo.psm1, line 245 at r2 (raw file):
Change to DscResource.CodeCoverage/CodeCovIo.psm1, line 252 at r2 (raw file):
Whitespace after if Comments from Reviewable |
ae016c8
to
17d4b91
Compare
Add support for CodeCov.io for harness type tests
17d4b91
to
71d621d
Compare
Review status: 2 of 5 files reviewed at latest revision, 39 unresolved discussions. AppVeyor.psm1, line 242 at r2 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. AppVeyor.psm1, line 244 at r2 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. AppVeyor.psm1, line 252 at r2 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. AppVeyor.psm1, line 257 at r2 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. README.md, line 253 at r2 (raw file): Previously, johlju (Johan Ljunggren) wrote…
No, and I think I can simplify this both should be very similar. README.md, line 260 at r2 (raw file): Previously, johlju (Johan Ljunggren) wrote…
See previous comment DscResource.CodeCoverage/CodeCovIo.psm1, line 7 at r2 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Parameters names should be singular in PowerShell. DscResource.CodeCoverage/CodeCovIo.psm1, line 24 at r2 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. DscResource.CodeCoverage/CodeCovIo.psm1, line 33 at r2 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. DscResource.CodeCoverage/CodeCovIo.psm1, line 37 at r2 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. DscResource.CodeCoverage/CodeCovIo.psm1, line 42 at r2 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. DscResource.CodeCoverage/CodeCovIo.psm1, line 45 at r2 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. DscResource.CodeCoverage/CodeCovIo.psm1, line 50 at r2 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. DscResource.CodeCoverage/CodeCovIo.psm1, line 57 at r2 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. DscResource.CodeCoverage/CodeCovIo.psm1, line 85 at r2 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. DscResource.CodeCoverage/CodeCovIo.psm1, line 86 at r2 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. DscResource.CodeCoverage/CodeCovIo.psm1, line 89 at r2 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. DscResource.CodeCoverage/CodeCovIo.psm1, line 93 at r2 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. DscResource.CodeCoverage/CodeCovIo.psm1, line 101 at r2 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. DscResource.CodeCoverage/CodeCovIo.psm1, line 109 at r2 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. DscResource.CodeCoverage/CodeCovIo.psm1, line 122 at r2 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. DscResource.CodeCoverage/CodeCovIo.psm1, line 125 at r2 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. DscResource.CodeCoverage/CodeCovIo.psm1, line 135 at r2 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. DscResource.CodeCoverage/CodeCovIo.psm1, line 144 at r2 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. DscResource.CodeCoverage/CodeCovIo.psm1, line 151 at r2 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. DscResource.CodeCoverage/CodeCovIo.psm1, line 157 at r2 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. DscResource.CodeCoverage/CodeCovIo.psm1, line 158 at r2 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. DscResource.CodeCoverage/CodeCovIo.psm1, line 160 at r2 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. DscResource.CodeCoverage/CodeCovIo.psm1, line 162 at r2 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. DscResource.CodeCoverage/CodeCovIo.psm1, line 167 at r2 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. DscResource.CodeCoverage/CodeCovIo.psm1, line 171 at r2 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. DscResource.CodeCoverage/CodeCovIo.psm1, line 175 at r2 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. DscResource.CodeCoverage/CodeCovIo.psm1, line 180 at r2 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. DscResource.CodeCoverage/CodeCovIo.psm1, line 187 at r2 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. DscResource.CodeCoverage/CodeCovIo.psm1, line 194 at r2 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. DscResource.CodeCoverage/CodeCovIo.psm1, line 205 at r2 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. DscResource.CodeCoverage/CodeCovIo.psm1, line 212 at r2 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. DscResource.CodeCoverage/CodeCovIo.psm1, line 245 at r2 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. DscResource.CodeCoverage/CodeCovIo.psm1, line 252 at r2 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. Comments from Reviewable |
Review status: 2 of 5 files reviewed at latest revision, 38 unresolved discussions. DscResource.CodeCoverage/CodeCovIo.psm1, line 7 at r2 (raw file): Previously, TravisEz13 (Travis Plunk) wrote…
I updated all instances to be signular DscResource.CodeCoverage/CodeCovIo.psm1, line 86 at r2 (raw file): Previously, TravisEz13 (Travis Plunk) wrote…
Since it's an object I also added a validate script. Comments from Reviewable |
@TravisEz13 SharePointDsc and xNetworking is the only two that uses the Harness type. But don't know if they have been fixed for the new model yet. @PlagueHO has PR's for fixing some, which I was suppose to help him review this weekend (but had to work half the weekend). Maybe SharePointDsc is your best bet. |
Reviewed 3 of 3 files at r3. DscResource.CodeCoverage/CodeCovIo.psm1, line 70 at r3 (raw file):
Typo 'property' DscResource.CodeCoverage/CodeCovIo.psm1, line 88 at r3 (raw file):
Single quotes DscResource.CodeCoverage/CodeCovIo.psm1, line 120 at r3 (raw file):
Should add Comments from Reviewable |
Review status: 4 of 5 files reviewed at latest revision, 3 unresolved discussions. DscResource.CodeCoverage/CodeCovIo.psm1, line 70 at r3 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. DscResource.CodeCoverage/CodeCovIo.psm1, line 88 at r3 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. DscResource.CodeCoverage/CodeCovIo.psm1, line 120 at r3 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. Comments from Reviewable |
Reviewed 1 of 1 files at r4. Comments from Reviewable |
@TravisEz13 - This looks awesome! Can't wait to implement it. Just some nitpicks. Reviewed 1 of 4 files at r1, 1 of 2 files at r2, 2 of 3 files at r3, 1 of 1 files at r4. AppVeyor.psm1, line 246 at r4 (raw file):
Could we add parameter name? AppVeyor.psm1, line 247 at r4 (raw file):
Could we add parameter name? AppVeyor.psm1, line 253 at r4 (raw file):
Could we add parameter name? Comments from Reviewable |
Review status: all files reviewed at latest revision, 3 unresolved discussions. AppVeyor.psm1, line 246 at r4 (raw file): Previously, PlagueHO (Daniel Scott-Raynsford) wrote…
Done. AppVeyor.psm1, line 247 at r4 (raw file): Previously, PlagueHO (Daniel Scott-Raynsford) wrote…
Done. AppVeyor.psm1, line 253 at r4 (raw file): Previously, PlagueHO (Daniel Scott-Raynsford) wrote…
Done. Comments from Reviewable |
AppVeyor.psm1
Outdated
[Parameter(ParameterSetName = 'Harness')] | ||
[Parameter(ParameterSetName = 'DefaultCodeCoverage')] | ||
[Switch] | ||
$CodCovIo, |
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.
$CodeCovIo
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.
Done
.PARAMETER $TableName | ||
The path of the file to write the report to. | ||
#> | ||
function Add-UniqueFileLine |
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.
Add-UniqueFileLineToTable
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.
Done
.PARAMETER $RepoRoot | ||
The path to the root of the repo. This part of the path will not be included in the report. Needed to normalize all the reports. | ||
|
||
.PARAMETER $TableName |
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.
TableName
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.
Done
.PARAMETER Command | ||
The list of Command from pester to update the table based on | ||
|
||
.PARAMETER $RepoRoot |
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.
RepoRoot
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.
Done
.SYNOPSIS | ||
Updates a hash table with the Unique file lines | ||
Structure: | ||
RootTable.[FileKey].[SubTable].[Line |
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.
[Line]
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.
Done
.PARAMETER CodeCoverage | ||
The CodeCoverage property of the output of Invoke-Pester with the -PassThru and -CodeCoverage options | ||
|
||
.PARAMETER $RepoRoot |
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.
RepoRoot
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.
Done
.PARAMETER $RepoRoot | ||
The path to the root of the repo. This part of the path will not be included in the report. Needed to normalize all the reports. | ||
|
||
.PARAMETER $Path |
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.
Path
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.
Done
Description = 'This module is used to assist in Code Coverage for PowerShell DSC resoruces' | ||
|
||
# Minimum version of the Windows PowerShell engine required by this module | ||
# PowerShellVersion = '' |
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.
Should have minimum PowerShell version
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.
Done
README.md
Outdated
|
||
### Repos using `-Type 'Default'` for `Invoke-AppveyorTestScriptTask` | ||
|
||
1. On the call to `Invoke-AppveyorTestScriptTask`, make sure you have |
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.
Add a note that this is code coverage through Pester and not code coverage with CodeCovIO
Also please add a note about what the difference between running these two is or why you would or would not want to run one or the other.
560211d
to
2f905eb
Compare
2f905eb
to
2793677
Compare
This address part of #88
Tested here:
TravisEz13 ForceAppVeyor results
Code tree results are here
Good example file result are here
Also, you can add one of the browser extensions and just browse the code on GitHub.
TravisEz13/xWindowsUpdate//dev/.../MSFT_xWindowsUpdateAgent.psm1
Green lines indicating hits and red indicating misses (the missed code was mocked, indicating we need integration tests):
This change is