I updated the PublishCodeCoverageResults@1
Azure DevOps pipeline task to version @2
and encountered an issue. Your help is welcome.
After updating the task, the pipeline build output returns: "No source directories supplied for 'JaCoCo' coverage file." The files in the code coverage report in Azure DevOps are not clickable. However, Azure DevOps returns the correct line coverage percentage and lines. The code coverage reports look okay while the pipeline is still running.
This is what my task looks like:
- task: PublishCodeCoverageResults@2
inputs:
summaryFileLocation: '**/coverage.scripts.myModule.xml'
pathToSources: '$(build.sourcesdirectory)'
condition: and(in(variables['Agent.JobStatus'], 'Succeeded', 'SucceededWithIssues', 'Failed'), eq(variables.pwsh, 'True'))