Skip to content
This repository has been archived by the owner on Feb 24, 2021. It is now read-only.

Codecov is no longer generate for "Harness"-model resource modules #229

Closed
johlju opened this issue May 23, 2018 · 2 comments
Closed

Codecov is no longer generate for "Harness"-model resource modules #229

johlju opened this issue May 23, 2018 · 2 comments
Assignees
Labels
bug The issue is a bug.

Comments

@johlju
Copy link
Contributor

johlju commented May 23, 2018

The problem is that the parameter CodeCoverage is not used by the Harness-module repositories so line 913 will never be $true.

if ($CodeCovIo.IsPresent)
{
if ($CodeCoverage.IsPresent)
{
# Get the code coverage result from build worker test run.
$entireCodeCoverage = $results.CodeCoverage

@johlju johlju added bug The issue is a bug. in progress The issue is being actively worked on by someone. labels May 23, 2018
@PlagueHO
Copy link
Collaborator

@johlju: I wonder: if we want to bring the auto-documentation modules more inline with the other modules, perhaps it would be better to add the CodeCoverage parameter to the auto-documentation repos?

johlju added a commit to johlju/DscResource.Tests that referenced this issue May 24, 2018
johlju added a commit to johlju/DscResource.Tests that referenced this issue May 24, 2018
- Codecov is once again uploaded for "Harness"-model resource modules (issue PowerShell#229).
@johlju
Copy link
Contributor Author

johlju commented May 24, 2018

@PlagueHO I changed the code now so that when Codecov is set and there are code coverage in the Pester object, upload will happen.

But agree that CodeCoverage parameter should be used by the Harness-repos today too regardless. The harness function (in each harness-repo) could support -CodeCoverage to disable that if the repo does not want coverage. If adding CodeCoverage parameter nothing will happen (except workaround the bug), so if you want to add the parameter, do so, it's harmless.

I will send in the fix (and the regression tests) once tested.

@johlju johlju self-assigned this May 24, 2018
johlju added a commit that referenced this issue May 24, 2018
- Updated AppVeyor.Tests
  - Mock for Resolve-CoverageInfo was removed since it was not used.
  - Moved importing of DscResource.CodeCoverage module to top of AppVeyor.psm1
    for easier mocking.
  - Added regression tests for issue #229.
- Changes to AppVeyor.psm1
  - Codecov is once again uploaded for "Harness"-model resource modules (issue #229).
@johlju johlju removed the in progress The issue is being actively worked on by someone. label May 24, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug The issue is a bug.
Projects
None yet
Development

No branches or pull requests

2 participants