diff --git a/.github/workflows/Process-PSModule.yml b/.github/workflows/Process-PSModule.yml index a70f92d..510eea3 100644 --- a/.github/workflows/Process-PSModule.yml +++ b/.github/workflows/Process-PSModule.yml @@ -27,17 +27,9 @@ permissions: jobs: Process-PSModule: - uses: PSModule/Process-PSModule/.github/workflows/workflow.yml@ea19a3eb1293246d1b00e4faae1544442c3be0ec # v6.1.1 + uses: PSModule/Process-PSModule/.github/workflows/workflow.yml@d4020f3c9c3621cebae5d8bf4ffaf10f55c1784a # v6.1.2 secrets: APIKEY: ${{ secrets.APIKEY }} - # Showcase: send data down to the module tests (see tests/Environment.Tests.ps1). - # TestData is a single-line JSON object with optional "secrets" (masked in logs) and - # "variables" (not masked) maps. Every entry is exposed to the module test jobs as - # $env:. Reference a repository secret with the direct "${{ secrets.NAME }}" - # form (single-line values, no quotes or backslashes) and a repository variable with - # ${{ toJSON(vars.NAME) }} so any characters are encoded safely. The folded ">-" scalar - # keeps the whole value on one line so GitHub registers a single log mask. Omit - # TestData entirely when your tests need no data. TestData: >- { "secrets": { "TEST_SECRET": "${{ secrets.TEST_SECRET }}" }, "variables": { "TEST_VARIABLE": ${{ toJSON(vars.TEST_VARIABLE) }} } } diff --git a/src/functions/public/IndexSection/Get-IndexSectionTest.ps1 b/src/functions/public/IndexSection/Get-IndexSectionTest.ps1 new file mode 100644 index 0000000..9c36ed5 --- /dev/null +++ b/src/functions/public/IndexSection/Get-IndexSectionTest.ps1 @@ -0,0 +1,21 @@ +function Get-IndexSectionTest { + <# + .SYNOPSIS + Performs tests on a module. + + .DESCRIPTION + Performs tests on a module. + + .EXAMPLE + Get-IndexSectionTest -Name 'World' + + "Hello, World!" + #> + [CmdletBinding()] + param ( + # Name of the person to greet. + [Parameter(Mandatory)] + [string] $Name + ) + Write-Output "Hello, $Name!" +} diff --git a/src/functions/public/IndexSection/index.md b/src/functions/public/IndexSection/index.md new file mode 100644 index 0000000..7b29823 --- /dev/null +++ b/src/functions/public/IndexSection/index.md @@ -0,0 +1,5 @@ +# Index Section + +This section's landing page is provided by an `index.md` file. + +When Process-PSModule builds the documentation site, this page becomes the landing page for the **Index Section** group in the navigation on GitHub Pages. diff --git a/src/functions/public/NamedSection/Get-NamedSectionTest.ps1 b/src/functions/public/NamedSection/Get-NamedSectionTest.ps1 new file mode 100644 index 0000000..4ec9f6e --- /dev/null +++ b/src/functions/public/NamedSection/Get-NamedSectionTest.ps1 @@ -0,0 +1,21 @@ +function Get-NamedSectionTest { + <# + .SYNOPSIS + Performs tests on a module. + + .DESCRIPTION + Performs tests on a module. + + .EXAMPLE + Get-NamedSectionTest -Name 'World' + + "Hello, World!" + #> + [CmdletBinding()] + param ( + # Name of the person to greet. + [Parameter(Mandatory)] + [string] $Name + ) + Write-Output "Hello, $Name!" +} diff --git a/src/functions/public/NamedSection/NamedSection.md b/src/functions/public/NamedSection/NamedSection.md new file mode 100644 index 0000000..6adff38 --- /dev/null +++ b/src/functions/public/NamedSection/NamedSection.md @@ -0,0 +1,5 @@ +# Named Section + +This section's landing page is provided by a file named after its folder (`NamedSection.md`). + +When Process-PSModule builds the documentation site, this page becomes the landing page for the **Named Section** group in the navigation on GitHub Pages. diff --git a/tests/PSModuleTest.Tests.ps1 b/tests/PSModuleTest.Tests.ps1 index b856855..7b06f67 100644 --- a/tests/PSModuleTest.Tests.ps1 +++ b/tests/PSModuleTest.Tests.ps1 @@ -22,4 +22,10 @@ Describe 'Module' { It 'Function: Test-PSModuleTest' { Test-PSModuleTest -Name 'World' | Should -Be 'Hello, World!' } + It 'Function: Get-IndexSectionTest' { + Get-IndexSectionTest -Name 'World' | Should -Be 'Hello, World!' + } + It 'Function: Get-NamedSectionTest' { + Get-NamedSectionTest -Name 'World' | Should -Be 'Hello, World!' + } }