diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml new file mode 100644 index 00000000..3b09998a --- /dev/null +++ b/.github/workflows/CI.yml @@ -0,0 +1,652 @@ +name: Process-PSModule - CI + +on: + workflow_call: + inputs: + Name: + type: string + description: The name of the module to process. Scripts default to the repository name if nothing is specified. + required: false + Path: + type: string + description: The path to the source code of the module. + required: false + default: src + ModulesOutputPath: + type: string + description: The path to the output directory for the modules. + required: false + default: outputs/modules + DocsOutputPath: + type: string + description: The path to the output directory for the documentation. + required: false + default: outputs/docs + SiteOutputPath: + type: string + description: The path to the output directory for the site. + required: false + default: outputs/site + SkipTests: + type: string + description: Defines what types of tests to skip. Allowed values are 'All', 'SourceCode', 'Module', 'None', 'macOS', 'Windows', 'Linux', 'Desktop', 'Core'. + required: false + default: None + Version: + type: string + description: The version of the 'Utilities' module to process. + required: false + Prerelease: + type: boolean + description: Whether the version is a prerelease. + required: false + default: false + PublishDocs: + type: boolean + description: Whether to publish the documentation using MkDocs and GitHub Pages. + required: false + default: true + +env: + GITHUB_TOKEN: ${{ github.token }} # Used for GitHub CLI authentication + +permissions: + contents: read # to check out the repo contents + +jobs: + TestSourceCode-pwsh-ubuntu-latest: + name: Test source code (pwsh, ubuntu-latest) + if: ${{ !(contains(inputs.SkipTests, 'All') || contains(inputs.SkipTests, 'SourceCode') || contains(inputs.SkipTests, 'Linux') || contains(inputs.SkipTests, 'Core')) }} + runs-on: ubuntu-latest + steps: + - name: Checkout Code + uses: actions/checkout@v4 + + - name: Initialize environment + uses: PSModule/Initialize-PSModule@v1 + with: + Version: ${{ inputs.Version }} + Prerelease: ${{ inputs.Prerelease }} + Shell: pwsh + + - name: Test source code + id: test + uses: PSModule/Test-PSModule@v1 + with: + Name: ${{ inputs.Name }} + Path: ${{ inputs.Path }} + Shell: pwsh + TestType: SourceCode + + TestSourceCode-pwsh-macos-latest: + name: Test source code (pwsh, macos-latest) + if: ${{ !(contains(inputs.SkipTests, 'All') || contains(inputs.SkipTests, 'SourceCode' ) || contains(inputs.SkipTests, 'macOS') || contains(inputs.SkipTests, 'Core')) }} + runs-on: macos-latest + outputs: + passed: ${{ steps.test.outputs.passed }} + steps: + - name: Checkout Code + uses: actions/checkout@v4 + + - name: Initialize environment + uses: PSModule/Initialize-PSModule@v1 + with: + Version: ${{ inputs.Version }} + Prerelease: ${{ inputs.Prerelease }} + Shell: pwsh + + - name: Test source code + id: test + uses: PSModule/Test-PSModule@v1 + with: + Name: ${{ inputs.Name }} + Path: ${{ inputs.Path }} + Shell: pwsh + TestType: SourceCode + + TestSourceCode-pwsh-windows-latest: + name: Test source code (pwsh, windows-latest) + if: ${{ !(contains(inputs.SkipTests, 'All' ) || contains(inputs.SkipTests, 'SourceCode' ) || contains(inputs.SkipTests, 'Windows') || contains(inputs.SkipTests, 'Core')) }} + runs-on: windows-latest + outputs: + passed: ${{ steps.test.outputs.passed }} + steps: + - name: Checkout Code + uses: actions/checkout@v4 + + - name: Initialize environment + uses: PSModule/Initialize-PSModule@v1 + with: + Version: ${{ inputs.Version }} + Prerelease: ${{ inputs.Prerelease }} + Shell: pwsh + + - name: Test source code + id: test + uses: PSModule/Test-PSModule@v1 + with: + Name: ${{ inputs.Name }} + Path: ${{ inputs.Path }} + Shell: pwsh + TestType: SourceCode + + TestSourceCode-powershell-windows-latest: + name: Test source code (powershell, windows-latest) + if: ${{ !(contains(inputs.SkipTests, 'All' ) || contains(inputs.SkipTests, 'SourceCode' ) || contains(inputs.SkipTests, 'Windows') || contains(inputs.SkipTests, 'Desktop')) }} + runs-on: windows-latest + outputs: + passed: ${{ steps.test.outputs.passed }} + steps: + - name: Checkout Code + uses: actions/checkout@v4 + + - name: Initialize environment + uses: PSModule/Initialize-PSModule@v1 + with: + Version: ${{ inputs.Version }} + Prerelease: ${{ inputs.Prerelease }} + Shell: powershell + + - name: Test source code + id: test + uses: PSModule/Test-PSModule@v1 + with: + Name: ${{ inputs.Name }} + Path: ${{ inputs.Path }} + Shell: powershell + TestType: SourceCode + + BuildModule: + name: Build module + if: ${{ contains(fromJson('["success", "skipped"]'), needs.TestSourceCode-pwsh-ubuntu-latest.result) && contains(fromJson('["success", "skipped"]'), needs.TestSourceCode-pwsh-macos-latest.result) && contains(fromJson('["success", "skipped"]'), needs.TestSourceCode-pwsh-windows-latest.result) && contains(fromJson('["success", "skipped"]'), needs.TestSourceCode-powershell-windows-latest.result) && !cancelled() }} + needs: + - TestSourceCode-pwsh-ubuntu-latest + - TestSourceCode-pwsh-macos-latest + - TestSourceCode-pwsh-windows-latest + - TestSourceCode-powershell-windows-latest + runs-on: ubuntu-latest + steps: + - name: Checkout Code + uses: actions/checkout@v4 + + - name: Initialize environment + uses: PSModule/Initialize-PSModule@v1 + with: + Version: ${{ inputs.Version }} + Prerelease: ${{ inputs.Prerelease }} + + - name: Build module + uses: PSModule/Build-PSModule@v1 + with: + Name: ${{ inputs.Name }} + Path: ${{ inputs.Path }} + ModulesOutputPath: ${{ inputs.ModulesOutputPath }} + DocsOutputPath: ${{ inputs.DocsOutputPath }} + + - name: Upload module artifact + uses: actions/upload-artifact@v4 + with: + name: module + path: ${{ inputs.ModulesOutputPath }} + if-no-files-found: error + retention-days: 1 + + - name: Upload docs artifact + uses: actions/upload-artifact@v4 + with: + name: docs + path: ${{ inputs.DocsOutputPath }} + if-no-files-found: error + retention-days: 1 + + #This is necessary as there is no way to get output from a matrix job + TestModule-pwsh-ubuntu-latest: + name: Test module (pwsh, ubuntu-latest) + if: ${{ needs.BuildModule.result == 'success' && !(contains(inputs.SkipTests, 'All') || contains(inputs.SkipTests, 'Module') || contains(inputs.SkipTests, 'Linux') || contains(inputs.SkipTests, 'Core')) && !cancelled() }} + needs: BuildModule + runs-on: ubuntu-latest + outputs: + passed: ${{ steps.test.outputs.passed }} + steps: + - name: Checkout Code + uses: actions/checkout@v4 + + - name: Initialize environment + uses: PSModule/Initialize-PSModule@v1 + with: + Version: ${{ inputs.Version }} + Prerelease: ${{ inputs.Prerelease }} + Shell: pwsh + + - name: Download module artifact + uses: actions/download-artifact@v4 + with: + name: module + path: ${{ inputs.ModulesOutputPath }} + + - name: Test built module + id: test + uses: PSModule/Test-PSModule@v1 + continue-on-error: true + with: + Name: ${{ inputs.Name }} + Path: ${{ inputs.ModulesOutputPath }} + Shell: pwsh + TestType: Module + + - name: Set status + if: steps.test.outcome != 'success' + shell: pwsh + run: Write-Host "Complete successfully" + + TestModule-pwsh-macos-latest: + name: Test module (pwsh, macos-latest) + if: ${{ needs.BuildModule.result == 'success' && !(contains(inputs.SkipTests, 'All') || contains(inputs.SkipTests, 'Module') || contains(inputs.SkipTests, 'macOS') || contains(inputs.SkipTests, 'Core')) && !cancelled() }} + needs: BuildModule + runs-on: macos-latest + outputs: + passed: ${{ steps.test.outputs.passed }} + steps: + - name: Checkout Code + uses: actions/checkout@v4 + + - name: Initialize environment + uses: PSModule/Initialize-PSModule@v1 + with: + Version: ${{ inputs.Version }} + Prerelease: ${{ inputs.Prerelease }} + Shell: pwsh + + - name: Download module artifact + uses: actions/download-artifact@v4 + with: + name: module + path: ${{ inputs.ModulesOutputPath }} + + - name: Test built module + id: test + uses: PSModule/Test-PSModule@v1 + continue-on-error: true + with: + Name: ${{ inputs.Name }} + Path: ${{ inputs.ModulesOutputPath }} + Shell: pwsh + TestType: Module + + - name: Set status + if: steps.test.outcome != 'success' + shell: pwsh + run: Write-Host "Complete successfully" + + TestModule-pwsh-windows-latest: + name: Test module (pwsh, windows-latest) + if: ${{ needs.BuildModule.result == 'success' && !(contains(inputs.SkipTests, 'All') || contains(inputs.SkipTests, 'Module') || contains(inputs.SkipTests, 'Windows') || contains(inputs.SkipTests, 'Core')) && !cancelled() }} + needs: BuildModule + runs-on: windows-latest + outputs: + passed: ${{ steps.test.outputs.passed }} + steps: + - name: Checkout Code + uses: actions/checkout@v4 + + - name: Initialize environment + uses: PSModule/Initialize-PSModule@v1 + with: + Version: ${{ inputs.Version }} + Prerelease: ${{ inputs.Prerelease }} + Shell: pwsh + + - name: Download module artifact + uses: actions/download-artifact@v4 + with: + name: module + path: ${{ inputs.ModulesOutputPath }} + + - name: Test built module + id: test + uses: PSModule/Test-PSModule@v1 + continue-on-error: true + with: + Name: ${{ inputs.Name }} + Path: ${{ inputs.ModulesOutputPath }} + Shell: pwsh + TestType: Module + + - name: Set status + if: steps.test.outcome != 'success' + shell: pwsh + run: Write-Host "Complete successfully" + + TestModule-powershell-windows-latest: + name: Test module (powershell, windows-latest) + if: ${{ needs.BuildModule.result == 'success' && !(contains(inputs.SkipTests, 'All') || contains(inputs.SkipTests, 'Module') || contains(inputs.SkipTests, 'Windows') || contains(inputs.SkipTests, 'Desktop')) && !cancelled() }} + needs: BuildModule + runs-on: windows-latest + outputs: + passed: ${{ steps.test.outputs.passed }} + steps: + - name: Checkout Code + uses: actions/checkout@v4 + + - name: Initialize environment + uses: PSModule/Initialize-PSModule@v1 + with: + Version: ${{ inputs.Version }} + Prerelease: ${{ inputs.Prerelease }} + Shell: powershell + + - name: Download module artifact + uses: actions/download-artifact@v4 + with: + name: module + path: ${{ inputs.ModulesOutputPath }} + + - name: Test built module + id: test + uses: PSModule/Test-PSModule@v1 + continue-on-error: true + with: + Name: ${{ inputs.Name }} + Path: ${{ inputs.ModulesOutputPath }} + Shell: powershell + TestType: Module + + - name: Set status + if: steps.test.outcome != 'success' + shell: pwsh + run: Write-Host "Complete successfully" + + TestModuleStatus: + name: Test module status + if: ${{ contains(fromJson('["success", "skipped"]'), needs.TestModule-pwsh-ubuntu-latest.result) && contains(fromJson('["success", "skipped"]'), needs.TestModule-pwsh-macos-latest.result) && contains(fromJson('["success", "skipped"]'), needs.TestModule-pwsh-windows-latest.result) && contains(fromJson('["success", "skipped"]'), needs.TestModule-powershell-windows-latest.result) && !cancelled() }} + needs: + - TestModule-pwsh-ubuntu-latest + - TestModule-pwsh-macos-latest + - TestModule-pwsh-windows-latest + - TestModule-powershell-windows-latest + runs-on: ubuntu-latest + steps: + - name: Checkout Code + uses: actions/checkout@v4 + + - name: Initialize environment + uses: PSModule/Initialize-PSModule@v1 + with: + Version: ${{ inputs.Version }} + Prerelease: ${{ inputs.Prerelease }} + + - name: Download module artifact + uses: actions/download-artifact@v4 + with: + name: module + path: ${{ inputs.ModulesOutputPath }} + + - name: Summerize tests + shell: pwsh + run: | + Start-LogGroup -Name 'Passed tests' + + $linuxPassed = '${{ needs.TestModule-pwsh-ubuntu-latest.outputs.passed }}' -eq 'true' + $linuxSkipped = '${{ needs.TestModule-pwsh-ubuntu-latest.result }}' -eq 'skipped' + $macOSPassed = '${{ needs.TestModule-pwsh-macos-latest.outputs.passed }}' -eq 'true' + $macOSSkipped = '${{ needs.TestModule-pwsh-macos-latest.result }}' -eq 'skipped' + $windowsPassed = '${{ needs.TestModule-pwsh-windows-latest.outputs.passed }}' -eq 'true' + $windowsSkipped = '${{ needs.TestModule-pwsh-windows-latest.result }}' -eq 'skipped' + $desktopPassed = '${{ needs.TestModule-powershell-windows-latest.outputs.passed }}' -eq 'true' + $desktopSkipped = '${{ needs.TestModule-powershell-windows-latest.result }}' -eq 'skipped' + $corePassed = $linuxPassed -or $macOSPassed -or $windowsPassed + $coreSkipped = $linuxSkipped -and $macOSSkipped -and $windowsSkipped + $anyPassed = $corePassed -or $desktopPassed + $allSkipped = $coreSkipped -and $desktopSkipped + + $Status = @( + [pscustomobject]@{ + Name = 'Linux' + Icon = $linuxSkipped ? '⚠️' : $linuxPassed ? '✅' : '❌' + Status = $linuxSkipped ? 'Skipped' : $linuxPassed ? 'Passed' : 'Failed' + } + [pscustomobject]@{ + Name = 'MacOS' + Icon = $macOSSkipped ? '⚠️' : $macOSPassed ? '✅' : '❌' + Status = $macOSSkipped ? 'Skipped' : $macOSPassed ? 'Passed' : 'Failed' + } + [pscustomobject]@{ + Name = 'Windows' + Icon = $windowsSkipped ? '⚠️' : $windowsPassed ? '✅' : '❌' + Status = $windowsSkipped ? 'Skipped' : $windowsPassed ? 'Passed' : 'Failed' + } + [pscustomobject]@{ + Name = 'Desktop' + Icon = $desktopSkipped ? '⚠️' : $desktopPassed ? '✅' : '❌' + Status = $desktopSkipped ? 'Skipped' : $desktopPassed ? 'Passed' : 'Failed' + } + [pscustomobject]@{ + Name = 'Core' + Icon = $coreSkipped ? '⚠️' : $corePassed ? '✅' : '❌' + Status = $coreSkipped ? 'Skipped' : $corePassed ? 'Passed' : 'Failed' + } + [pscustomobject]@{ + Name = 'Result' + Icon = $allSkipped ? '⚠️' : $anyPassed ? '✅' : '❌' + Status = $allSkipped ? 'Skipped' : $anyPassed ? 'Passed' : 'Failed' + } + ) + + Write-Host ($Status | Format-Table | Out-String) + ($Status | New-MDTable) | Out-File -FilePath $env:GITHUB_STEP_SUMMARY -Append + Stop-LogGroup + + if (-not $anyPassed -and -not $allSkipped) { + Write-Host "::[error]::No tests passed" + exit 1 + } + + Start-LogGroup -Name 'Data' + $moduleName = [string]::IsNullOrEmpty('${{ inputs.Name }}') ? $env:GITHUB_REPOSITORY_NAME : '${{ inputs.Name }}' + $path = Join-Path -Path $env:GITHUB_WORKSPACE -ChildPath "${{ inputs.ModulesOutputPath }}\$moduleName" + $moduleManifestPath = Join-Path -Path $Path -ChildPath "$moduleName.psd1" + + $data = [pscustomobject]@{ + ModuleName = $moduleName + Path = $path + ModuleManifestPath = $moduleManifestPath + } + Write-Verbose ($data | Format-List | Out-String) -Verbose + + Set-ModuleManifest -Path $moduleManifestPath -PowerShellVersion '5.1' + + if ($desktopPassed) { + Add-ModuleManifestData -Path $moduleManifestPath -CompatiblePSEditions 'Desktop' + Add-ModuleManifestData -Path $moduleManifestPath -Tags 'PSEdition_Desktop' + } else { + Set-ModuleManifest -Path $moduleManifestPath -PowerShellVersion '7.0' + } + + if ($corePassed) { + Add-ModuleManifestData -Path $moduleManifestPath -CompatiblePSEditions 'Core' + Add-ModuleManifestData -Path $moduleManifestPath -Tags 'PSEdition_Core' + } + + if ($linuxPassed) { + Add-ModuleManifestData -Path $moduleManifestPath -Tags 'Linux' + } + + if ($macOSPassed) { + Add-ModuleManifestData -Path $moduleManifestPath -Tags 'MacOS' + } + + if ($windowsPassed) { + Add-ModuleManifestData -Path $moduleManifestPath -Tags 'Windows' + } + Stop-LogGroup + + Start-LogGroup -Name 'Module Manifest' + Show-FileContent -Path $moduleManifestPath + Stop-LogGroup + + - name: Upload module artifact + uses: actions/upload-artifact@v4 + with: + name: module + path: ${{ inputs.ModulesOutputPath }} + if-no-files-found: error + retention-days: 1 + overwrite: true + + LintDocs: + name: Lint documentation + if: ${{ needs.BuildModule.result == 'success' && !cancelled() }} + needs: BuildModule + runs-on: ubuntu-latest + steps: + - name: Checkout Code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + ref: ${{ github.event.pull_request.head.sha }} + + - name: Download docs artifact + uses: actions/download-artifact@v4 + with: + name: docs + path: ${{ github.workspace }} + + - name: Commit docs for linting + shell: pwsh + run: | + git config --global user.name "Github Actions" + git config --global user.email "github-actions[bot]@users.noreply.github.com" + git add . + git commit -m "Update documentation" + + - name: Lint documentation + uses: super-linter/super-linter/slim@latest + env: + DEFAULT_BRANCH: main + DEFAULT_WORKSPACE: ${{ github.workspace }} + ENABLE_GITHUB_ACTIONS_GROUP_TITLE: true + GITHUB_TOKEN: ${{ github.token }} + RUN_LOCAL: true + VALIDATE_ALL_CODEBASE: false + VALIDATE_JSCPD: false + + BuildSite: + name: Build Site + if: ${{ inputs.PublishDocs && needs.LintDocs.result == 'success' && !cancelled() }} + needs: LintDocs + runs-on: ubuntu-latest + steps: + - name: Checkout Code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + ref: ${{ github.event.pull_request.head.sha }} + + - name: Initialize environment + uses: PSModule/Initialize-PSModule@v1 + with: + Version: ${{ inputs.Version }} + Prerelease: ${{ inputs.Prerelease }} + + - name: Download docs artifact + uses: actions/download-artifact@v4 + with: + name: docs + path: ${{ inputs.DocsOutputPath }} + + - name: Debug File system + shell: pwsh + run: | + Get-ChildItem -Path $env:GITHUB_WORKSPACE -Recurse | Select-Object -ExpandProperty FullName | Sort-Object + + - name: Debug Env vars + shell: pwsh + run: | + Get-ChildItem env: | Format-Table + + - uses: actions/configure-pages@v5 + + - name: Install mkdoks-material + shell: pwsh + run: | + pip install mkdocs-material + pip install mkdocs-git-authors-plugin + pip install mkdocs-git-revision-date-localized-plugin + pip install mkdocs-git-committers-plugin-2 + + - name: Run Script + shell: pwsh + run: | + $ModuleName = '${{ inputs.Name }}' + + if (-not $ModuleName) { + $ModuleName = $env:GITHUB_REPOSITORY -replace '.+/' + } + Write-Verbose "Module name: $ModuleName" + + $ModuleSourcePath = Join-Path (Get-Location) -ChildPath '${{ inputs.Path }}' + $DocsOutputPath = Join-Path (Get-Location) -ChildPath "${{ inputs.DocsOutputPath }}/$ModuleName" + $SiteOutputPath = Join-Path (Get-Location) -ChildPath '${{ inputs.SiteOutputPath }}' + + $functionDocsFolderPath = Join-Path -Path $SiteOutputPath -ChildPath 'docs/Functions' + $functionDocsFolder = New-Item -Path $functionDocsFolderPath -ItemType Directory -Force + Get-ChildItem -Path $DocsOutputPath -Recurse -Force -Include '*.md' | Copy-Item -Destination $functionDocsFolder -Recurse -Force + Get-ChildItem -Path $functionDocsFolder -Recurse -Force -Include '*.md' | ForEach-Object { + $fileName = $_.Name + $hash = (Get-FileHash -Path $_.FullName -Algorithm SHA256).Hash + Start-LogGroup " - [$fileName] - [$hash]" + Show-FileContent -Path $_ + Stop-LogGroup + } + + Start-LogGroup 'Build docs - Process about topics' + $aboutDocsFolderPath = Join-Path -Path $SiteOutputPath -ChildPath 'docs/About' + $aboutDocsFolder = New-Item -Path $aboutDocsFolderPath -ItemType Directory -Force + $aboutSourceFolder = Get-ChildItem -Path $ModuleSourcePath -Directory | Where-Object { $_.Name -eq 'en-US' } + Get-ChildItem -Path $aboutSourceFolder -Filter *.txt | Copy-Item -Destination $aboutDocsFolder -Force -Verbose -PassThru | + Rename-Item -NewName { $_.Name -replace '.txt', '.md' } + Stop-LogGroup + + Start-LogGroup 'Build docs - Copy icon to assets' + $assetsFolderPath = Join-Path -Path $SiteOutputPath -ChildPath 'docs/Assets' + $null = New-Item -Path $assetsFolderPath -ItemType Directory -Force + $rootPath = Split-Path -Path $ModuleSourcePath -Parent + $iconPath = Join-Path -Path $rootPath -ChildPath 'icon\icon.png' + Copy-Item -Path $iconPath -Destination $assetsFolderPath -Force -Verbose + + Start-LogGroup 'Build docs - Copy readme.md' + $rootPath = Split-Path -Path $ModuleSourcePath -Parent + $readmePath = Join-Path -Path $rootPath -ChildPath 'README.md' + $readmeTargetPath = Join-Path -Path $SiteOutputPath -ChildPath 'docs/README.md' + Copy-Item -Path $readmePath -Destination $readmeTargetPath -Force -Verbose + Stop-LogGroup + + Start-LogGroup 'Build docs - Create mkdocs.yml' + $rootPath = Split-Path -Path $ModuleSourcePath -Parent + # This should be moved to an action so that we can use a default one, and not have to copy it from the repo. + $mkdocsSourcePath = Join-Path -Path $rootPath -ChildPath 'mkdocs.yml' + $mkdocsTargetPath = Join-Path -Path $SiteOutputPath -ChildPath 'mkdocs.yml' + $mkdocsContent = Get-Content -Path $mkdocsSourcePath -Raw + $mkdocsContent = $mkdocsContent.Replace('-{{ REPO_NAME }}-', $ModuleName) + $mkdocsContent = $mkdocsContent.Replace('-{{ REPO_OWNER }}-', $env:GITHUB_REPOSITORY_OWNER) + $mkdocsContent | Set-Content -Path $mkdocsTargetPath -Force + Show-FileContent -Path $mkdocsTargetPath + Stop-LogGroup + + - name: Debug File system + shell: pwsh + run: | + Get-ChildItem -Path $env:GITHUB_WORKSPACE -Recurse | Select-Object -ExpandProperty FullName | Sort-Object + + - name: Build mkdocs-material project + working-directory: ${{ inputs.SiteOutputPath }} + shell: pwsh + run: | + Start-LogGroup 'Build docs - mkdocs build - content' + Show-FileContent -Path mkdocs.yml + Stop-LogGroup + Start-LogGroup 'Build docs - mkdocs build' + mkdocs build --config-file mkdocs.yml --site-dir ${{ github.workspace }}/_site + Stop-LogGroup + + - uses: actions/upload-pages-artifact@v3 diff --git a/.github/workflows/Workflow-Test-Default-CI.yml b/.github/workflows/Workflow-Test-Default-CI.yml new file mode 100644 index 00000000..d6b409fc --- /dev/null +++ b/.github/workflows/Workflow-Test-Default-CI.yml @@ -0,0 +1,25 @@ +name: Workflow-Test CI [Default] + +run-name: "Workflow-Test CI [Default] - [${{ github.event.pull_request.title }} #${{ github.event.pull_request.number }}] by @${{ github.actor }}" + +on: [pull_request] + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +permissions: + contents: write + pull-requests: write + statuses: write + +jobs: + WorkflowTestCIDefault: + uses: ./.github/workflows/CI.yml + secrets: inherit + with: + Name: PSModuleTest + Path: tests/src + ModulesOutputPath: tests/outputs/modules + DocsOutputPath: tests/outputs/docs + SkipTests: Module diff --git a/.github/workflows/Workflow-Test-WithManifest-CI.yml b/.github/workflows/Workflow-Test-WithManifest-CI.yml new file mode 100644 index 00000000..8cbf2632 --- /dev/null +++ b/.github/workflows/Workflow-Test-WithManifest-CI.yml @@ -0,0 +1,25 @@ +name: Workflow-Test CI [WithManifest] + +run-name: "Workflow-Test CI [WithManifest] - [${{ github.event.pull_request.title }} #${{ github.event.pull_request.number }}] by @${{ github.actor }}" + +on: [pull_request] + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +permissions: + contents: write + pull-requests: write + statuses: write + +jobs: + WorkflowTestCIWithManifest: + uses: ./.github/workflows/CI.yml + secrets: inherit + with: + Name: PSModuleTest + Path: tests/srcWithManifest + ModulesOutputPath: tests/outputs/modules + DocsOutputPath: tests/outputs/docs + SkipTests: Desktop, Linux