psake / PowerShellBuild

Common build tasks for psake and Invoke-Build that build and test PowerShell modules
MIT License
133 stars 24 forks source link

Codecoverage param update #49

Closed solstone closed 3 years ago

solstone commented 4 years ago

I added 2 new params to allow the output of Pester Code coverage reports to a file.

Related Issue

Issue #48 - Add pester code coverage output parameters

Motivation and Context

I am using Azure Devops to build a module and I want to display the code coverage report in Azure Devops.

How Has This Been Tested?

I have used the updated code in a module build and it successfully produced the code coverage report in the proper location. I was able to update the properties in my psakeFile to change this location successfully. I also confirmed that the build still works successfully without the code coverage report. The code passed all of the current pester test. I am unsure were I would add any pester test for this enhancement. If you point me to the proper place I think a test to confirm the output file exist would be pretty easy.

Screenshots (if appropriate):

Types of changes

Checklist:

solstone commented 4 years ago

I am not sure why the AppVeyor is failing. The test run fine locally.

devblackops commented 3 years ago

@solstone Sorry for sitting on this for so long. I'm about to push an update that will start using Pester v5 that won't be compatible with this PR as is. Just an FYI that this PR will have to be rebased and updated slightly.

solstone commented 3 years ago

@devblackops Cool, I will wait for you to push your update then see where I stand on this. I haven't messed much with Pester v5, so I may have to tweak some things with this update. I will keep an eye out for the commit.

devblackops commented 3 years ago

@solstone Updates are pushed

devblackops commented 3 years ago

@solstone I added code coverage options for output file and format in https://github.com/psake/PowerShellBuild/commit/638b8378322aa8a50318b95fde9c01700fc64763