diff --git a/.github/workflows/Action-Test.yml b/.github/workflows/Action-Test.yml index ae765ba..8597323 100644 --- a/.github/workflows/Action-Test.yml +++ b/.github/workflows/Action-Test.yml @@ -25,14 +25,11 @@ jobs: - name: Checkout repo uses: actions/checkout@v4 - - name: Initialize environment - uses: PSModule/Initialize-PSModule@main - - name: Upload module artifact uses: actions/upload-artifact@v4 with: name: module - path: tests/outputs/modules + path: tests/srcTestRepo/outputs/module if-no-files-found: error retention-days: 1 @@ -40,6 +37,4 @@ jobs: uses: ./ with: Name: PSModuleTest - Path: tests/src - ModulesOutputPath: tests/outputs/modules - DocsOutputPath: tests/outputs/docs + WorkingDirectory: tests/srcTestRepo diff --git a/.github/workflows/Auto-Release.yml b/.github/workflows/Auto-Release.yml index 1a580b8..db872f5 100644 --- a/.github/workflows/Auto-Release.yml +++ b/.github/workflows/Auto-Release.yml @@ -30,5 +30,3 @@ jobs: - name: Auto-Release uses: PSModule/Auto-Release@v1 - env: - GITHUB_TOKEN: ${{ github.token }} diff --git a/README.md b/README.md index d560186..9fb3dfe 100644 --- a/README.md +++ b/README.md @@ -1,17 +1,45 @@ -# Template-Action +# Document-PSModule (by PSModule) -A template repository for GitHub Actions +A GitHub Action that automates the generation of documentation for PowerShell modules using Markdown help files. + +This GitHub Action is a part of the [PSModule framework](https://github.com/PSModule). It is recommended to use the +[Process-PSModule workflow](https://github.com/PSModule/Process-PSModule) to automate the whole process of managing the PowerShell module. + +## Details + +This action: +- Installs necessary modules, including `platyPS` for documentation generation. +- Loads helper scripts required by the documentation process. +- Generates Markdown documentation from PowerShell module files. +- Ensures Markdown documentation is properly formatted, with correctly tagged PowerShell code blocks. +- Adjusts Markdown file paths to mirror the structure of the source PowerShell module files. +- Outputs organized Markdown documentation suitable for publishing or distribution. ## Usage +Include this action in your workflow to automatically build and structure documentation for your PowerShell module. + ### Inputs +| Input | Description | Required | Default | +|--------------------|-----------------------------------------------|----------|-------------| +| `Name` | Name of the module to document. | No | | +| `WorkingDirectory` | Directory from which the script will execute. | No | `.` | + ### Secrets +This action does not require any secrets. + ### Outputs +This action does not have defined outputs. + ### Example ```yaml -Example here +- name: Document PowerShell Module + uses: PSModule/Document-PSModule@v1 + with: + Name: 'MyModule' + WorkingDirectory: './module-directory' ``` diff --git a/action.yml b/action.yml index a890336..e5b49d8 100644 --- a/action.yml +++ b/action.yml @@ -1,4 +1,4 @@ -name: Build-PSModuleDocumentation (by PSModule) +name: Document-PSModule (by PSModule) description: Build documentation for a PowerShell module. author: PSModule branding: @@ -9,71 +9,22 @@ inputs: Name: description: Name of the module to process. required: false - Path: - description: Path to the folder where the modules are located. + WorkingDirectory: + description: The working directory where the script will run from. required: false - default: src - ModulesOutputPath: - description: Path to the folder where the built modules are outputted. - required: false - default: outputs/modules - DocsOutputPath: - description: Path to the folder where the built docs are outputted. - required: false - default: outputs/docs - ModuleArtifactName: - description: Name of the module artifact to upload. - required: false - default: module - DocsArtifactName: - description: Name of the docs artifact to upload. - required: false - default: docs - Debug: - description: Enable debug output. - required: false - default: 'false' - Verbose: - description: Enable verbose output. - required: false - default: 'false' - Version: - description: Specifies the version of the GitHub module to be installed. The value must be an exact version. - required: false - Prerelease: - description: Allow prerelease versions if available. - required: false - default: 'false' + default: '.' runs: using: composite steps: - - name: Download module artifact - uses: actions/download-artifact@v4 - with: - name: ${{ inputs.ModuleArtifactName }} - path: ${{ inputs.ModulesOutputPath }} + - name: Install-PSModuleHelpers + uses: PSModule/Install-PSModuleHelpers@v1 - - name: Run Build-PSModuleDocumentation - uses: PSModule/GitHub-Script@v1 + - name: Document-PSModule + shell: pwsh env: GITHUB_ACTION_INPUT_Name: ${{ inputs.Name }} - GITHUB_ACTION_INPUT_Path: ${{ inputs.Path }} - GITHUB_ACTION_INPUT_ModulesOutputPath: ${{ inputs.ModulesOutputPath }} - GITHUB_ACTION_INPUT_DocsOutputPath: ${{ inputs.DocsOutputPath }} - with: - Debug: ${{ inputs.Debug }} - Prerelease: ${{ inputs.Prerelease }} - Verbose: ${{ inputs.Verbose }} - Version: ${{ inputs.Version }} - Script: | - # Build-PSModuleDocumentation - ${{ github.action_path }}\scripts\main.ps1 - - - name: Upload docs artifact - uses: actions/upload-artifact@v4 - with: - name: ${{ inputs.DocsArtifactName }} - path: ${{ inputs.DocsOutputPath }} - if-no-files-found: error - retention-days: 1 + working-directory: ${{ inputs.WorkingDirectory }} + run: | + # Build-PSModuleDocumentation + ${{ github.action_path }}/scripts/main.ps1 diff --git a/scripts/helpers/Build-PSModuleDocumentation.ps1 b/scripts/helpers/Build-PSModuleDocumentation.ps1 index cc0bb90..d979beb 100644 --- a/scripts/helpers/Build-PSModuleDocumentation.ps1 +++ b/scripts/helpers/Build-PSModuleDocumentation.ps1 @@ -7,16 +7,10 @@ Builds a module. #> [CmdletBinding()] - [Diagnostics.CodeAnalysis.SuppressMessageAttribute( - 'PSReviewUnusedParameter', '', Scope = 'Function', - Justification = 'LogGroup - Scoping affects the variables line of sight.' - )] [Diagnostics.CodeAnalysis.SuppressMessageAttribute( 'PSAvoidUsingWriteHost', '', Scope = 'Function', Justification = 'Want to just write to the console, not the pipeline.' )] - #Requires -Modules GitHub - #Requires -Modules Utilities param( # Name of the module. [Parameter(Mandatory)] @@ -35,95 +29,99 @@ [string] $DocsOutputFolderPath ) - LogGroup "Documenting module [$ModuleName]" { - Write-Host "Source path: [$ModuleSourceFolderPath]" - if (-not (Test-Path -Path $ModuleSourceFolderPath)) { - Write-Error "Source folder not found at [$ModuleSourceFolderPath]" - exit 1 - } - $moduleSourceFolder = Get-Item -Path $ModuleSourceFolderPath - Write-Host "Module source folder: [$moduleSourceFolder]" - - $moduleOutputFolder = New-Item -Path $ModulesOutputFolderPath -Name $ModuleName -ItemType Directory -Force - Write-Host "Module output folder: [$moduleOutputFolder]" + Write-Host "::group::Documenting module [$ModuleName]" + [pscustomobject]@{ + ModuleName = $ModuleName + ModuleSourceFolderPath = $ModuleSourceFolderPath + ModulesOutputFolderPath = $ModulesOutputFolderPath + DocsOutputFolderPath = $DocsOutputFolderPath + } | Format-List | Out-String - $docsOutputFolder = New-Item -Path $DocsOutputFolderPath -ItemType Directory -Force - Write-Host "Docs output folder: [$docsOutputFolder]" + if (-not (Test-Path -Path $ModuleSourceFolderPath)) { + Write-Error "Source folder not found at [$ModuleSourceFolderPath]" + exit 1 } + $moduleSourceFolder = Get-Item -Path $ModuleSourceFolderPath + $moduleOutputFolder = New-Item -Path $ModulesOutputFolderPath -Name $ModuleName -ItemType Directory -Force + $docsOutputFolder = New-Item -Path $DocsOutputFolderPath -ItemType Directory -Force - LogGroup 'Build docs - Generate markdown help' { - Add-PSModulePath -Path (Split-Path -Path $ModuleOutputFolder -Parent) - $ModuleName | Remove-Module -Force -ErrorAction SilentlyContinue - Import-PSModule -Path $ModuleOutputFolder -ModuleName $ModuleName - Write-Host ($ModuleName | Get-Module) - $null = New-MarkdownHelp -Module $ModuleName -OutputFolder $DocsOutputFolder -Force -Verbose + Write-Host '::group::Build docs - Generate markdown help - Raw' + Install-PSModule -Path $ModuleOutputFolder + Write-Host ($ModuleName | Get-Module) + $null = New-MarkdownHelp -Module $ModuleName -OutputFolder $DocsOutputFolder -Force -Verbose + Get-ChildItem -Path $DocsOutputFolder -Recurse -Force -Include '*.md' | ForEach-Object { + $fileName = $_.Name + Write-Host "::group:: - [$fileName]" + Show-FileContent -Path $_ } - LogGroup 'Build docs - Fix markdown code blocks' { - Get-ChildItem -Path $DocsOutputFolder -Recurse -Force -Include '*.md' | ForEach-Object { - $content = Get-Content -Path $_.FullName - $fixedOpening = $false - $newContent = @() - foreach ($line in $content) { - if ($line -match '^```$' -and -not $fixedOpening) { - $line = $line -replace '^```$', '```powershell' - $fixedOpening = $true - } elseif ($line -match '^```.+$') { - $fixedOpening = $true - } elseif ($line -match '^```$') { - $fixedOpening = $false - } - $newContent += $line + Write-Host '::group::Build docs - Fix markdown code blocks' + Get-ChildItem -Path $DocsOutputFolder -Recurse -Force -Include '*.md' | ForEach-Object { + $content = Get-Content -Path $_.FullName + $fixedOpening = $false + $newContent = @() + foreach ($line in $content) { + if ($line -match '^```$' -and -not $fixedOpening) { + $line = $line -replace '^```$', '```powershell' + $fixedOpening = $true + } elseif ($line -match '^```.+$') { + $fixedOpening = $true + } elseif ($line -match '^```$') { + $fixedOpening = $false } - $newContent | Set-Content -Path $_.FullName + $newContent += $line } + $newContent | Set-Content -Path $_.FullName } - LogGroup 'Build docs - Fix markdown escape characters' { - Get-ChildItem -Path $DocsOutputFolder -Recurse -Force -Include '*.md' | ForEach-Object { - $content = Get-Content -Path $_.FullName -Raw - $content = $content -replace '\\`', '`' - $content = $content -replace '\\\[', '[' - $content = $content -replace '\\\]', ']' - $content = $content -replace '\\\<', '<' - $content = $content -replace '\\\>', '>' - $content = $content -replace '\\\\', '\' - $content | Set-Content -Path $_.FullName - } + Write-Host '::group::Build docs - Fix markdown escape characters' + Get-ChildItem -Path $DocsOutputFolder -Recurse -Force -Include '*.md' | ForEach-Object { + $content = Get-Content -Path $_.FullName -Raw + $content = $content -replace '\\`', '`' + $content = $content -replace '\\\[', '[' + $content = $content -replace '\\\]', ']' + $content = $content -replace '\\\<', '<' + $content = $content -replace '\\\>', '>' + $content = $content -replace '\\\\', '\' + $content | Set-Content -Path $_.FullName } - LogGroup 'Build docs - Structure markdown files to match source files' { - $PublicFunctionsFolder = Join-Path $ModuleSourceFolder.FullName 'functions\public' | Get-Item - Get-ChildItem -Path $DocsOutputFolder -Recurse -Force -Include '*.md' | ForEach-Object { - $file = $_ - Write-Host "Processing: $file" + Write-Host '::group::Build docs - Structure markdown files to match source files' + $PublicFunctionsFolder = Join-Path $ModuleSourceFolder.FullName 'functions\public' | Get-Item + Get-ChildItem -Path $DocsOutputFolder -Recurse -Force -Include '*.md' | ForEach-Object { + $file = $_ + $relPath = [System.IO.Path]::GetRelativePath($DocsOutputFolder.FullName, $file.FullName) + Write-Host " - $relPath" + Write-Host " Path: $file" - # find the source code file that matches the markdown file - $scriptPath = Get-ChildItem -Path $PublicFunctionsFolder -Recurse -Force | Where-Object { $_.Name -eq ($file.BaseName + '.ps1') } - Write-Host "Found script path: $scriptPath" - $docsFilePath = ($scriptPath.FullName).Replace($PublicFunctionsFolder.FullName, $DocsOutputFolder.FullName).Replace('.ps1', '.md') - Write-Host "Doc file path: $docsFilePath" - $docsFolderPath = Split-Path -Path $docsFilePath -Parent - New-Item -Path $docsFolderPath -ItemType Directory -Force - Move-Item -Path $file.FullName -Destination $docsFilePath -Force - } - # Get the MD files that are in the public functions folder and move them to the same place in the docs folder - Get-ChildItem -Path $PublicFunctionsFolder -Recurse -Force -Include '*.md' | ForEach-Object { - $file = $_ - Write-Host "Processing: $file" - $docsFilePath = ($file.FullName).Replace($PublicFunctionsFolder.FullName, $DocsOutputFolder.FullName) - Write-Host "Doc file path: $docsFilePath" - $docsFolderPath = Split-Path -Path $docsFilePath -Parent - New-Item -Path $docsFolderPath -ItemType Directory -Force - Move-Item -Path $file.FullName -Destination $docsFilePath -Force - } + # find the source code file that matches the markdown file + $scriptPath = Get-ChildItem -Path $PublicFunctionsFolder -Recurse -Force | Where-Object { $_.Name -eq ($file.BaseName + '.ps1') } + Write-Host " PS1 path: $scriptPath" + $docsFilePath = ($scriptPath.FullName).Replace($PublicFunctionsFolder.FullName, $DocsOutputFolder.FullName).Replace('.ps1', '.md') + Write-Host " MD path: $docsFilePath" + $docsFolderPath = Split-Path -Path $docsFilePath -Parent + $null = New-Item -Path $docsFolderPath -ItemType Directory -Force + Move-Item -Path $file.FullName -Destination $docsFilePath -Force } + Write-Host '::group::Build docs - Move markdown files from source files to docs' + Get-ChildItem -Path $PublicFunctionsFolder -Recurse -Force -Include '*.md' | ForEach-Object { + $file = $_ + $relPath = [System.IO.Path]::GetRelativePath($PublicFunctionsFolder.FullName, $file.FullName) + Write-Host " - $relPath" + Write-Host " Path: $file" + + $docsFilePath = ($file.FullName).Replace($PublicFunctionsFolder.FullName, $DocsOutputFolder.FullName) + Write-Host " MD path: $docsFilePath" + $docsFolderPath = Split-Path -Path $docsFilePath -Parent + $null = New-Item -Path $docsFolderPath -ItemType Directory -Force + Move-Item -Path $file.FullName -Destination $docsFilePath -Force + } + + Write-Host '────────────────────────────────────────────────────────────────────────────────' Get-ChildItem -Path $DocsOutputFolder -Recurse -Force -Include '*.md' | ForEach-Object { $fileName = $_.Name - $hash = (Get-FileHash -Path $_.FullName -Algorithm SHA256).Hash - LogGroup " - [$fileName] - [$hash]" { - Show-FileContent -Path $_ - } + Write-Host "::group:: - [$fileName]" + Show-FileContent -Path $_ } } diff --git a/scripts/helpers/Import-PSModule.ps1 b/scripts/helpers/Import-PSModule.ps1 deleted file mode 100644 index f7a2e9b..0000000 --- a/scripts/helpers/Import-PSModule.ps1 +++ /dev/null @@ -1,53 +0,0 @@ -function Import-PSModule { - <# - .SYNOPSIS - Imports a build PS module. - - .DESCRIPTION - Imports a build PS module. - - .EXAMPLE - Import-PSModule -SourceFolderPath $ModuleFolderPath -ModuleName $ModuleName - - Imports a module located at $ModuleFolderPath with the name $ModuleName. - #> - [CmdletBinding()] - #Requires -Modules Utilities - [Diagnostics.CodeAnalysis.SuppressMessageAttribute( - 'PSAvoidUsingWriteHost', '', Scope = 'Function', - Justification = 'Want to just write to the console, not the pipeline.' - )] - param( - # Path to the folder where the module source code is located. - [Parameter(Mandatory)] - [string] $Path, - - # Name of the module. - [Parameter(Mandatory)] - [string] $ModuleName - ) - - $moduleName = Split-Path -Path $Path -Leaf - $manifestFileName = "$moduleName.psd1" - $manifestFilePath = Join-Path -Path $Path $manifestFileName - $manifestFile = Get-ModuleManifest -Path $manifestFilePath -As FileInfo -Verbose - - Write-Host "Manifest file path: [$($manifestFile.FullName)]" -Verbose - $existingModule = Get-Module -Name $ModuleName -ListAvailable - $existingModule | Remove-Module -Force -Verbose - $existingModule.RequiredModules | ForEach-Object { $_ | Remove-Module -Force -Verbose -ErrorAction SilentlyContinue } - $existingModule.NestedModules | ForEach-Object { $_ | Remove-Module -Force -Verbose -ErrorAction SilentlyContinue } - # Get-InstalledPSResource | Where-Object Name -EQ $ModuleName | Uninstall-PSResource -SkipDependencyCheck -Verbose:$false - Resolve-PSModuleDependency -ManifestFilePath $manifestFile - Import-Module -Name $ModuleName -RequiredVersion '999.0.0' - - Write-Host 'List loaded modules' - $availableModules = Get-Module -ListAvailable -Refresh -Verbose:$false - $availableModules | Select-Object Name, Version, Path | Sort-Object Name | Format-Table -AutoSize - Write-Host 'List commands' - Write-Host (Get-Command -Module $moduleName | Format-Table -AutoSize | Out-String) - - if ($ModuleName -notin $availableModules.Name) { - throw 'Module not found' - } -} diff --git a/scripts/helpers/Resolve-PSModuleDependency.ps1 b/scripts/helpers/Resolve-PSModuleDependency.ps1 deleted file mode 100644 index 14721f8..0000000 --- a/scripts/helpers/Resolve-PSModuleDependency.ps1 +++ /dev/null @@ -1,67 +0,0 @@ -function Resolve-PSModuleDependency { - <# - .SYNOPSIS - Resolve dependencies for a module based on the manifest file. - - .DESCRIPTION - Resolve dependencies for a module based on the manifest file, following PSModuleInfo structure - - .EXAMPLE - Resolve-PSModuleDependency -Path 'C:\MyModule\MyModule.psd1' - - Installs all modules defined in the manifest file, following PSModuleInfo structure. - - .NOTES - Should later be adapted to support both pre-reqs, and dependencies. - Should later be adapted to take 4 parameters sets: specific version ("requiredVersion" | "GUID"), latest version ModuleVersion, - and latest version within a range MinimumVersion - MaximumVersion. - #> - [Alias('Resolve-PSModuleDependencies')] - [CmdletBinding()] - #Requires -Modules Retry - [Diagnostics.CodeAnalysis.SuppressMessageAttribute( - 'PSAvoidUsingWriteHost', '', Scope = 'Function', - Justification = 'Want to just write to the console, not the pipeline.' - )] - param( - # The path to the manifest file. - [Parameter(Mandatory)] - [string] $ManifestFilePath - ) - - Write-Host 'Resolving dependencies' - - $manifest = Import-PowerShellDataFile -Path $ManifestFilePath - Write-Host "Reading [$ManifestFilePath]" - Write-Host "Found [$($manifest.RequiredModules.Count)] modules to install" - - foreach ($requiredModule in $manifest.RequiredModules) { - $installParams = @{} - - if ($requiredModule -is [string]) { - $installParams.Name = $requiredModule - } else { - $installParams.Name = $requiredModule.ModuleName - $installParams.MinimumVersion = $requiredModule.ModuleVersion - $installParams.RequiredVersion = $requiredModule.RequiredVersion - $installParams.MaximumVersion = $requiredModule.MaximumVersion - } - $installParams.Force = $true - $installParams.Verbose = $false - - Write-Host "[$($installParams.Name)] - Installing module" - $VerbosePreferenceOriginal = $VerbosePreference - $VerbosePreference = 'SilentlyContinue' - Retry -Count 5 -Delay 10 { - Install-Module @installParams -AllowPrerelease:$false - } - $VerbosePreference = $VerbosePreferenceOriginal - Write-Host "[$($installParams.Name)] - Importing module" - $VerbosePreferenceOriginal = $VerbosePreference - $VerbosePreference = 'SilentlyContinue' - Import-Module @installParams - $VerbosePreference = $VerbosePreferenceOriginal - Write-Host "[$($installParams.Name)] - Done" - } - Write-Host 'Resolving dependencies - Done' -} diff --git a/scripts/main.ps1 b/scripts/main.ps1 index 37d9e92..608fe59 100644 --- a/scripts/main.ps1 +++ b/scripts/main.ps1 @@ -5,35 +5,43 @@ [CmdletBinding()] param() -#Requires -Modules Utilities +$PSStyle.OutputRendering = 'Ansi' -$path = (Join-Path -Path $PSScriptRoot -ChildPath 'helpers') | Get-Item | Resolve-Path -Relative -LogGroup "Loading helper scripts from [$path]" { - Get-ChildItem -Path $path -Filter '*.ps1' -Recurse | Resolve-Path -Relative | ForEach-Object { - Write-Host "$_" - . $_ +'platyPS' | ForEach-Object { + $name = $_ + Write-Output "Installing module: $name" + $retryCount = 5 + $retryDelay = 10 + for ($i = 0; $i -lt $retryCount; $i++) { + try { + Install-PSResource -Name $name -WarningAction SilentlyContinue -TrustRepository -Repository PSGallery + break + } catch { + Write-Warning "Installation of $($psResourceParams.Name) failed with error: $_" + if ($i -eq $retryCount - 1) { + throw + } + Write-Warning "Retrying in $retryDelay seconds..." + Start-Sleep -Seconds $retryDelay + } } + Import-Module -Name $name } -LogGroup 'Loading inputs' { - $moduleName = ($env:GITHUB_ACTION_INPUT_Name | IsNullOrEmpty) ? $env:GITHUB_REPOSITORY_NAME : $env:GITHUB_ACTION_INPUT_Name - Write-Host "Module name: [$moduleName]" - - $moduleSourceFolderPath = Join-Path -Path $env:GITHUB_WORKSPACE -ChildPath $env:GITHUB_ACTION_INPUT_Path/$moduleName - if (-not (Test-Path -Path $moduleSourceFolderPath)) { - $moduleSourceFolderPath = Join-Path -Path $env:GITHUB_WORKSPACE -ChildPath $env:GITHUB_ACTION_INPUT_Path - } - Write-Host "Source module path: [$moduleSourceFolderPath]" - if (-not (Test-Path -Path $moduleSourceFolderPath)) { - throw "Module path [$moduleSourceFolderPath] does not exist." - } - - $modulesOutputFolderPath = Join-Path $env:GITHUB_WORKSPACE $env:GITHUB_ACTION_INPUT_ModulesOutputPath - Write-Host "Modules output path: [$modulesOutputFolderPath]" - $docsOutputFolderPath = Join-Path $env:GITHUB_WORKSPACE $env:GITHUB_ACTION_INPUT_DocsOutputPath - Write-Host "Docs output path: [$docsOutputFolderPath]" +$path = (Join-Path -Path $PSScriptRoot -ChildPath 'helpers') | Get-Item | Resolve-Path -Relative +Write-Host "::group::Loading helper scripts from [$path]" +Get-ChildItem -Path $path -Filter '*.ps1' -Recurse | Resolve-Path -Relative | ForEach-Object { + Write-Host "$_" + . $_ } +Write-Host '::group::Loading inputs' +$env:GITHUB_REPOSITORY_NAME = $env:GITHUB_REPOSITORY -replace '.+/' +$moduleName = [string]::IsNullOrEmpty($env:GITHUB_ACTION_INPUT_Name) ? $env:GITHUB_REPOSITORY_NAME : $env:GITHUB_ACTION_INPUT_Name +$moduleSourceFolderPath = Resolve-Path -Path 'src' | Select-Object -ExpandProperty Path +$modulesOutputFolderPath = Join-Path -Path . -ChildPath 'outputs/module' +$docsOutputFolderPath = Join-Path -Path . -ChildPath 'outputs/docs' + $params = @{ ModuleName = $moduleName ModuleSourceFolderPath = $moduleSourceFolderPath @@ -41,4 +49,6 @@ $params = @{ DocsOutputFolderPath = $docsOutputFolderPath } +[pscustomobject]$params | Format-List | Out-String + Build-PSModuleDocumentation @params diff --git a/tests/outputs/modules/PSModuleTest/PSModuleTest.psd1 b/tests/srcTestRepo/outputs/module/PSModuleTest/PSModuleTest.psd1 similarity index 100% rename from tests/outputs/modules/PSModuleTest/PSModuleTest.psd1 rename to tests/srcTestRepo/outputs/module/PSModuleTest/PSModuleTest.psd1 diff --git a/tests/outputs/modules/PSModuleTest/PSModuleTest.psm1 b/tests/srcTestRepo/outputs/module/PSModuleTest/PSModuleTest.psm1 similarity index 100% rename from tests/outputs/modules/PSModuleTest/PSModuleTest.psm1 rename to tests/srcTestRepo/outputs/module/PSModuleTest/PSModuleTest.psm1 diff --git a/tests/outputs/modules/PSModuleTest/assemblies/LsonLib.dll b/tests/srcTestRepo/outputs/module/PSModuleTest/assemblies/LsonLib.dll similarity index 100% rename from tests/outputs/modules/PSModuleTest/assemblies/LsonLib.dll rename to tests/srcTestRepo/outputs/module/PSModuleTest/assemblies/LsonLib.dll diff --git a/tests/outputs/modules/PSModuleTest/data/Config.psd1 b/tests/srcTestRepo/outputs/module/PSModuleTest/data/Config.psd1 similarity index 100% rename from tests/outputs/modules/PSModuleTest/data/Config.psd1 rename to tests/srcTestRepo/outputs/module/PSModuleTest/data/Config.psd1 diff --git a/tests/outputs/modules/PSModuleTest/data/Settings.psd1 b/tests/srcTestRepo/outputs/module/PSModuleTest/data/Settings.psd1 similarity index 100% rename from tests/outputs/modules/PSModuleTest/data/Settings.psd1 rename to tests/srcTestRepo/outputs/module/PSModuleTest/data/Settings.psd1 diff --git a/tests/outputs/modules/PSModuleTest/formats/CultureInfo.Format.ps1xml b/tests/srcTestRepo/outputs/module/PSModuleTest/formats/CultureInfo.Format.ps1xml similarity index 100% rename from tests/outputs/modules/PSModuleTest/formats/CultureInfo.Format.ps1xml rename to tests/srcTestRepo/outputs/module/PSModuleTest/formats/CultureInfo.Format.ps1xml diff --git a/tests/outputs/modules/PSModuleTest/formats/Mygciview.Format.ps1xml b/tests/srcTestRepo/outputs/module/PSModuleTest/formats/Mygciview.Format.ps1xml similarity index 100% rename from tests/outputs/modules/PSModuleTest/formats/Mygciview.Format.ps1xml rename to tests/srcTestRepo/outputs/module/PSModuleTest/formats/Mygciview.Format.ps1xml diff --git a/tests/outputs/modules/PSModuleTest/modules/OtherPSModule.psm1 b/tests/srcTestRepo/outputs/module/PSModuleTest/modules/OtherPSModule.psm1 similarity index 100% rename from tests/outputs/modules/PSModuleTest/modules/OtherPSModule.psm1 rename to tests/srcTestRepo/outputs/module/PSModuleTest/modules/OtherPSModule.psm1 diff --git a/tests/outputs/modules/PSModuleTest/scripts/loader.ps1 b/tests/srcTestRepo/outputs/module/PSModuleTest/scripts/loader.ps1 similarity index 100% rename from tests/outputs/modules/PSModuleTest/scripts/loader.ps1 rename to tests/srcTestRepo/outputs/module/PSModuleTest/scripts/loader.ps1 diff --git a/tests/outputs/modules/PSModuleTest/types/DirectoryInfo.Types.ps1xml b/tests/srcTestRepo/outputs/module/PSModuleTest/types/DirectoryInfo.Types.ps1xml similarity index 100% rename from tests/outputs/modules/PSModuleTest/types/DirectoryInfo.Types.ps1xml rename to tests/srcTestRepo/outputs/module/PSModuleTest/types/DirectoryInfo.Types.ps1xml diff --git a/tests/outputs/modules/PSModuleTest/types/FileInfo.Types.ps1xml b/tests/srcTestRepo/outputs/module/PSModuleTest/types/FileInfo.Types.ps1xml similarity index 100% rename from tests/outputs/modules/PSModuleTest/types/FileInfo.Types.ps1xml rename to tests/srcTestRepo/outputs/module/PSModuleTest/types/FileInfo.Types.ps1xml diff --git a/tests/src/assemblies/LsonLib.dll b/tests/srcTestRepo/src/assemblies/LsonLib.dll similarity index 100% rename from tests/src/assemblies/LsonLib.dll rename to tests/srcTestRepo/src/assemblies/LsonLib.dll diff --git a/tests/src/classes/private/SecretWriter.ps1 b/tests/srcTestRepo/src/classes/private/SecretWriter.ps1 similarity index 100% rename from tests/src/classes/private/SecretWriter.ps1 rename to tests/srcTestRepo/src/classes/private/SecretWriter.ps1 diff --git a/tests/src/classes/public/Book.ps1 b/tests/srcTestRepo/src/classes/public/Book.ps1 similarity index 100% rename from tests/src/classes/public/Book.ps1 rename to tests/srcTestRepo/src/classes/public/Book.ps1 diff --git a/tests/src/data/Config.psd1 b/tests/srcTestRepo/src/data/Config.psd1 similarity index 100% rename from tests/src/data/Config.psd1 rename to tests/srcTestRepo/src/data/Config.psd1 diff --git a/tests/src/data/Settings.psd1 b/tests/srcTestRepo/src/data/Settings.psd1 similarity index 100% rename from tests/src/data/Settings.psd1 rename to tests/srcTestRepo/src/data/Settings.psd1 diff --git a/tests/src/finally.ps1 b/tests/srcTestRepo/src/finally.ps1 similarity index 100% rename from tests/src/finally.ps1 rename to tests/srcTestRepo/src/finally.ps1 diff --git a/tests/src/formats/CultureInfo.Format.ps1xml b/tests/srcTestRepo/src/formats/CultureInfo.Format.ps1xml similarity index 100% rename from tests/src/formats/CultureInfo.Format.ps1xml rename to tests/srcTestRepo/src/formats/CultureInfo.Format.ps1xml diff --git a/tests/src/formats/Mygciview.Format.ps1xml b/tests/srcTestRepo/src/formats/Mygciview.Format.ps1xml similarity index 100% rename from tests/src/formats/Mygciview.Format.ps1xml rename to tests/srcTestRepo/src/formats/Mygciview.Format.ps1xml diff --git a/tests/src/functions/private/Get-InternalPSModule.ps1 b/tests/srcTestRepo/src/functions/private/Get-InternalPSModule.ps1 similarity index 100% rename from tests/src/functions/private/Get-InternalPSModule.ps1 rename to tests/srcTestRepo/src/functions/private/Get-InternalPSModule.ps1 diff --git a/tests/src/functions/private/Set-InternalPSModule.ps1 b/tests/srcTestRepo/src/functions/private/Set-InternalPSModule.ps1 similarity index 100% rename from tests/src/functions/private/Set-InternalPSModule.ps1 rename to tests/srcTestRepo/src/functions/private/Set-InternalPSModule.ps1 diff --git a/tests/src/functions/public/PSModule/Get-PSModuleTest.ps1 b/tests/srcTestRepo/src/functions/public/PSModule/Get-PSModuleTest.ps1 similarity index 100% rename from tests/src/functions/public/PSModule/Get-PSModuleTest.ps1 rename to tests/srcTestRepo/src/functions/public/PSModule/Get-PSModuleTest.ps1 diff --git a/tests/src/functions/public/PSModule/New-PSModuleTest.ps1 b/tests/srcTestRepo/src/functions/public/PSModule/New-PSModuleTest.ps1 similarity index 100% rename from tests/src/functions/public/PSModule/New-PSModuleTest.ps1 rename to tests/srcTestRepo/src/functions/public/PSModule/New-PSModuleTest.ps1 diff --git a/tests/src/functions/public/PSModule/PSModule.md b/tests/srcTestRepo/src/functions/public/PSModule/PSModule.md similarity index 100% rename from tests/src/functions/public/PSModule/PSModule.md rename to tests/srcTestRepo/src/functions/public/PSModule/PSModule.md diff --git a/tests/src/functions/public/SomethingElse/Set-PSModuleTest.ps1 b/tests/srcTestRepo/src/functions/public/SomethingElse/Set-PSModuleTest.ps1 similarity index 100% rename from tests/src/functions/public/SomethingElse/Set-PSModuleTest.ps1 rename to tests/srcTestRepo/src/functions/public/SomethingElse/Set-PSModuleTest.ps1 diff --git a/tests/src/functions/public/SomethingElse/SomethingElse.md b/tests/srcTestRepo/src/functions/public/SomethingElse/SomethingElse.md similarity index 100% rename from tests/src/functions/public/SomethingElse/SomethingElse.md rename to tests/srcTestRepo/src/functions/public/SomethingElse/SomethingElse.md diff --git a/tests/src/functions/public/Test-PSModuleTest.ps1 b/tests/srcTestRepo/src/functions/public/Test-PSModuleTest.ps1 similarity index 100% rename from tests/src/functions/public/Test-PSModuleTest.ps1 rename to tests/srcTestRepo/src/functions/public/Test-PSModuleTest.ps1 diff --git a/tests/src/header.ps1 b/tests/srcTestRepo/src/header.ps1 similarity index 100% rename from tests/src/header.ps1 rename to tests/srcTestRepo/src/header.ps1 diff --git a/tests/src/init/initializer.ps1 b/tests/srcTestRepo/src/init/initializer.ps1 similarity index 100% rename from tests/src/init/initializer.ps1 rename to tests/srcTestRepo/src/init/initializer.ps1 diff --git a/tests/src/modules/OtherPSModule.psm1 b/tests/srcTestRepo/src/modules/OtherPSModule.psm1 similarity index 100% rename from tests/src/modules/OtherPSModule.psm1 rename to tests/srcTestRepo/src/modules/OtherPSModule.psm1 diff --git a/tests/src/scripts/loader.ps1 b/tests/srcTestRepo/src/scripts/loader.ps1 similarity index 100% rename from tests/src/scripts/loader.ps1 rename to tests/srcTestRepo/src/scripts/loader.ps1 diff --git a/tests/src/types/DirectoryInfo.Types.ps1xml b/tests/srcTestRepo/src/types/DirectoryInfo.Types.ps1xml similarity index 100% rename from tests/src/types/DirectoryInfo.Types.ps1xml rename to tests/srcTestRepo/src/types/DirectoryInfo.Types.ps1xml diff --git a/tests/src/types/FileInfo.Types.ps1xml b/tests/srcTestRepo/src/types/FileInfo.Types.ps1xml similarity index 100% rename from tests/src/types/FileInfo.Types.ps1xml rename to tests/srcTestRepo/src/types/FileInfo.Types.ps1xml diff --git a/tests/src/variables/private/PrivateVariables.ps1 b/tests/srcTestRepo/src/variables/private/PrivateVariables.ps1 similarity index 100% rename from tests/src/variables/private/PrivateVariables.ps1 rename to tests/srcTestRepo/src/variables/private/PrivateVariables.ps1 diff --git a/tests/src/variables/public/Moons.ps1 b/tests/srcTestRepo/src/variables/public/Moons.ps1 similarity index 100% rename from tests/src/variables/public/Moons.ps1 rename to tests/srcTestRepo/src/variables/public/Moons.ps1 diff --git a/tests/src/variables/public/Planets.ps1 b/tests/srcTestRepo/src/variables/public/Planets.ps1 similarity index 100% rename from tests/src/variables/public/Planets.ps1 rename to tests/srcTestRepo/src/variables/public/Planets.ps1 diff --git a/tests/src/variables/public/SolarSystems.ps1 b/tests/srcTestRepo/src/variables/public/SolarSystems.ps1 similarity index 100% rename from tests/src/variables/public/SolarSystems.ps1 rename to tests/srcTestRepo/src/variables/public/SolarSystems.ps1