Closed Sidoran closed 7 months ago
Maybe we can use Get-SamplerModuleRootPath
instead to get the module root path? If other tasks work then that might solve it too?
Maybe we can use
Get-SamplerModuleRootPath
instead to get the module root path? If other tasks work then that might solve it too?
Sorry, @johlju , I didn't get how the Get-SamplerModuleRootPath may help solve the issue. As I understand, the Get-SamplerModuleRootPath outputs the *.psm1 file path, but the problem in the module.tests.ps1 that receives from git diff list of the files with the Git Top level related path as you may see on a screenshot: So the module.tests.ps1.template#L86 rule will fail.
Ah sorry. I misunderstood the issue. I'm following you now!
Problem description
The module.tests.ps1 doesn't correctly identify that the module root folder is different from the git top-level folder. This problem is specific to the repos with the multiple modules in it.
Verbose logs
How to reproduce
Expected behavior
The module.tests.ps1 should match the git top level with the ProjectPath and correctly derive the ChangeLog.md file path.
Current behavior
The module.tests.ps1 is looking for ChangeLog.md in the git top-level folder.
Suggested solution
Add
$gitRelatedModulePath
to a BeforeAll sectionChange the
$filesChanged
and$filesStagedAndUnstaged
in theIt 'Changelog has been updated'
Operating system the target node is running
PowerShell version and build the target node is running
Module version used