Skip to content

Commit 2c3cc05

Browse files
committed
fix: Copy template test files to build artifact
1 parent e29faba commit 2c3cc05

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

.github/workflows/build-and-test-powershell-module.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,9 +157,14 @@ jobs:
157157
Write-Output "Testing the module manifest file '$moduleManifestFilePath' to ensure it is valid."
158158
Test-ModuleManifest -Path $moduleManifestFilePath
159159
160-
Write-Output "Copying the module files to the module artifact directory '$moduleArtifactDirectoryPath'."
160+
Write-Output "Copying the module files to the module artifact directory '$moduleArtifactDirectoryPath', excluding tests."
161161
Copy-Item -Path $moduleDirectoryPath -Destination $moduleArtifactDirectoryPath -Exclude '*.Tests.ps1' -Recurse -Force
162162
163+
[string] $moduleTemplateFilesDirectoryPath = Join-Path -Path $moduleDirectoryPath -ChildPath 'TemplateFiles'
164+
[string] $moduleArtifactTemplateFilesDirectoryPath = Join-Path -Path $moduleArtifactDirectoryPath -ChildPath 'TemplateFiles'
165+
Write-Output "Copying the module template test files to the module artifact directory '$moduleArtifactTemplateFilesDirectoryPath'."
166+
Copy-Item -Path $moduleTemplateFilesDirectoryPath -Destination $moduleArtifactTemplateFilesDirectoryPath -Include '*.Tests.ps1' -Recurse -Force
167+
163168
- name: Create deploy files artifact
164169
shell: pwsh
165170
run: |

0 commit comments

Comments
 (0)