From e11b3ae60685385ded34d2e087b86e9735faee49 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Thu, 23 Jul 2026 21:24:53 +0200 Subject: [PATCH 1/4] Support authored root functions index Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- .github/workflows/Workflow-Test-Default.yml | 41 +++++++++++++++++++ .../workflows/Workflow-Test-WithManifest.yml | 41 +++++++++++++++++++ .../srcTestRepo/src/functions/public/index.md | 10 +++++ .../src/functions/public/index.md | 10 +++++ 4 files changed, 102 insertions(+) create mode 100644 tests/srcTestRepo/src/functions/public/index.md create mode 100644 tests/srcWithManifestTestRepo/src/functions/public/index.md diff --git a/.github/workflows/Workflow-Test-Default.yml b/.github/workflows/Workflow-Test-Default.yml index 511b4b1c..2593a629 100644 --- a/.github/workflows/Workflow-Test-Default.yml +++ b/.github/workflows/Workflow-Test-Default.yml @@ -8,6 +8,7 @@ on: paths: - '.github/actions/**' - '.github/workflows/**' + - 'tests/srcTestRepo/**' - '!.github/workflows/Release.yml' - '!.github/workflows/Linter.yml' schedule: @@ -46,3 +47,43 @@ jobs: ^README\.md$ ^\.github/actions/ ^\.github/workflows/(?!Release\.yml$|Linter\.yml$) + + VerifyRootFunctionsIndexDefault: + name: Verify root Functions index [Default] + runs-on: ubuntu-latest + needs: + - WorkflowTestDefault + steps: + - name: Checkout repo + uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 + with: + persist-credentials: false + fetch-depth: 0 + + - name: Download docs artifact + uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 + with: + name: docs + path: tests/srcTestRepo/outputs/docs + + - name: Verify root Functions index is published + shell: pwsh + run: | + $path = 'tests/srcTestRepo/outputs/docs/index.md' + if (-not (Test-Path -Path $path)) { + throw 'Expected root Functions index at tests/srcTestRepo/outputs/docs/index.md.' + } + + $content = Get-Content -Path $path -Raw + $expectedSnippets = @( + 'ms.title: Functions' + '# Functions' + 'This landing page is authored from the root of `src/functions/public`.' + 'Use it to introduce the module''s function surface before readers drill into each group.' + ) + + foreach ($snippet in $expectedSnippets) { + if ($content -notlike "*$snippet*") { + throw "Expected snippet not found in generated root Functions index: $snippet" + } + } diff --git a/.github/workflows/Workflow-Test-WithManifest.yml b/.github/workflows/Workflow-Test-WithManifest.yml index 82f80f55..f7f7563b 100644 --- a/.github/workflows/Workflow-Test-WithManifest.yml +++ b/.github/workflows/Workflow-Test-WithManifest.yml @@ -8,6 +8,7 @@ on: paths: - '.github/actions/**' - '.github/workflows/**' + - 'tests/srcWithManifestTestRepo/**' - '!.github/workflows/Release.yml' - '!.github/workflows/Linter.yml' schedule: @@ -46,3 +47,43 @@ jobs: ^README\.md$ ^\.github/actions/ ^\.github/workflows/(?!Release\.yml$|Linter\.yml$) + + VerifyRootFunctionsIndexWithManifest: + name: Verify root Functions index [WithManifest] + runs-on: ubuntu-latest + needs: + - WorkflowTestWithManifest + steps: + - name: Checkout repo + uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 + with: + persist-credentials: false + fetch-depth: 0 + + - name: Download docs artifact + uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 + with: + name: docs + path: tests/srcWithManifestTestRepo/outputs/docs + + - name: Verify root Functions index is published + shell: pwsh + run: | + $path = 'tests/srcWithManifestTestRepo/outputs/docs/index.md' + if (-not (Test-Path -Path $path)) { + throw 'Expected root Functions index at tests/srcWithManifestTestRepo/outputs/docs/index.md.' + } + + $content = Get-Content -Path $path -Raw + $expectedSnippets = @( + 'ms.title: Functions' + '# Functions' + 'This landing page is authored from the root of `src/functions/public`.' + 'Use it to introduce the module''s function surface before readers drill into each group.' + ) + + foreach ($snippet in $expectedSnippets) { + if ($content -notlike "*$snippet*") { + throw "Expected snippet not found in generated root Functions index: $snippet" + } + } diff --git a/tests/srcTestRepo/src/functions/public/index.md b/tests/srcTestRepo/src/functions/public/index.md new file mode 100644 index 00000000..f92e4da7 --- /dev/null +++ b/tests/srcTestRepo/src/functions/public/index.md @@ -0,0 +1,10 @@ +--- +title: Functions +description: A fully authored landing page for the exported function surface. +--- + +# Functions + +This landing page is authored from the root of `src/functions/public`. + +Use it to introduce the module's function surface before readers drill into each group. diff --git a/tests/srcWithManifestTestRepo/src/functions/public/index.md b/tests/srcWithManifestTestRepo/src/functions/public/index.md new file mode 100644 index 00000000..f92e4da7 --- /dev/null +++ b/tests/srcWithManifestTestRepo/src/functions/public/index.md @@ -0,0 +1,10 @@ +--- +title: Functions +description: A fully authored landing page for the exported function surface. +--- + +# Functions + +This landing page is authored from the root of `src/functions/public`. + +Use it to introduce the module's function surface before readers drill into each group. From 4eae9591d9926b87c9beeca017c70a778fee1366 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sat, 8 Aug 2026 18:06:28 +0200 Subject: [PATCH 2/4] Fix authored Functions index lint Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- .github/workflows/Workflow-Test-Default.yml | 1 - .github/workflows/Workflow-Test-WithManifest.yml | 1 - tests/srcTestRepo/src/functions/public/index.md | 1 - tests/srcWithManifestTestRepo/src/functions/public/index.md | 1 - 4 files changed, 4 deletions(-) diff --git a/.github/workflows/Workflow-Test-Default.yml b/.github/workflows/Workflow-Test-Default.yml index 2593a629..c3055c44 100644 --- a/.github/workflows/Workflow-Test-Default.yml +++ b/.github/workflows/Workflow-Test-Default.yml @@ -76,7 +76,6 @@ jobs: $content = Get-Content -Path $path -Raw $expectedSnippets = @( - 'ms.title: Functions' '# Functions' 'This landing page is authored from the root of `src/functions/public`.' 'Use it to introduce the module''s function surface before readers drill into each group.' diff --git a/.github/workflows/Workflow-Test-WithManifest.yml b/.github/workflows/Workflow-Test-WithManifest.yml index f7f7563b..04077204 100644 --- a/.github/workflows/Workflow-Test-WithManifest.yml +++ b/.github/workflows/Workflow-Test-WithManifest.yml @@ -76,7 +76,6 @@ jobs: $content = Get-Content -Path $path -Raw $expectedSnippets = @( - 'ms.title: Functions' '# Functions' 'This landing page is authored from the root of `src/functions/public`.' 'Use it to introduce the module''s function surface before readers drill into each group.' diff --git a/tests/srcTestRepo/src/functions/public/index.md b/tests/srcTestRepo/src/functions/public/index.md index f92e4da7..2d436472 100644 --- a/tests/srcTestRepo/src/functions/public/index.md +++ b/tests/srcTestRepo/src/functions/public/index.md @@ -1,5 +1,4 @@ --- -title: Functions description: A fully authored landing page for the exported function surface. --- diff --git a/tests/srcWithManifestTestRepo/src/functions/public/index.md b/tests/srcWithManifestTestRepo/src/functions/public/index.md index f92e4da7..2d436472 100644 --- a/tests/srcWithManifestTestRepo/src/functions/public/index.md +++ b/tests/srcWithManifestTestRepo/src/functions/public/index.md @@ -1,5 +1,4 @@ --- -title: Functions description: A fully authored landing page for the exported function surface. --- From 760e360ddb29b11501df9b068afe8c0912709079 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sat, 8 Aug 2026 18:13:34 +0200 Subject: [PATCH 3/4] Fix Functions index verification checks Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- .github/workflows/Workflow-Test-Default.yml | 16 ++++++++++------ .github/workflows/Workflow-Test-WithManifest.yml | 16 ++++++++++------ 2 files changed, 20 insertions(+), 12 deletions(-) diff --git a/.github/workflows/Workflow-Test-Default.yml b/.github/workflows/Workflow-Test-Default.yml index c3055c44..0806fb62 100644 --- a/.github/workflows/Workflow-Test-Default.yml +++ b/.github/workflows/Workflow-Test-Default.yml @@ -61,7 +61,7 @@ jobs: fetch-depth: 0 - name: Download docs artifact - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 + uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c with: name: docs path: tests/srcTestRepo/outputs/docs @@ -71,18 +71,22 @@ jobs: run: | $path = 'tests/srcTestRepo/outputs/docs/index.md' if (-not (Test-Path -Path $path)) { - throw 'Expected root Functions index at tests/srcTestRepo/outputs/docs/index.md.' + throw 'Expected root Functions index at ' + + 'tests/srcTestRepo/outputs/docs/index.md.' } $content = Get-Content -Path $path -Raw $expectedSnippets = @( '# Functions' - 'This landing page is authored from the root of `src/functions/public`.' - 'Use it to introduce the module''s function surface before readers drill into each group.' + 'This landing page is authored from the root of ' + + '`src/functions/public`.' + 'Use it to introduce the module''s function surface ' + + 'before readers drill into each group.' ) foreach ($snippet in $expectedSnippets) { - if ($content -notlike "*$snippet*") { - throw "Expected snippet not found in generated root Functions index: $snippet" + if (-not $content.Contains($snippet)) { + throw 'Expected snippet not found in generated root ' + + "Functions index: $snippet" } } diff --git a/.github/workflows/Workflow-Test-WithManifest.yml b/.github/workflows/Workflow-Test-WithManifest.yml index 04077204..e4576760 100644 --- a/.github/workflows/Workflow-Test-WithManifest.yml +++ b/.github/workflows/Workflow-Test-WithManifest.yml @@ -61,7 +61,7 @@ jobs: fetch-depth: 0 - name: Download docs artifact - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 + uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c with: name: docs path: tests/srcWithManifestTestRepo/outputs/docs @@ -71,18 +71,22 @@ jobs: run: | $path = 'tests/srcWithManifestTestRepo/outputs/docs/index.md' if (-not (Test-Path -Path $path)) { - throw 'Expected root Functions index at tests/srcWithManifestTestRepo/outputs/docs/index.md.' + throw 'Expected root Functions index at ' + + 'tests/srcWithManifestTestRepo/outputs/docs/index.md.' } $content = Get-Content -Path $path -Raw $expectedSnippets = @( '# Functions' - 'This landing page is authored from the root of `src/functions/public`.' - 'Use it to introduce the module''s function surface before readers drill into each group.' + 'This landing page is authored from the root of ' + + '`src/functions/public`.' + 'Use it to introduce the module''s function surface ' + + 'before readers drill into each group.' ) foreach ($snippet in $expectedSnippets) { - if ($content -notlike "*$snippet*") { - throw "Expected snippet not found in generated root Functions index: $snippet" + if (-not $content.Contains($snippet)) { + throw 'Expected snippet not found in generated root ' + + "Functions index: $snippet" } } From 9ec6115d753e56774c36859c964c32c0a7740ee0 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sat, 8 Aug 2026 18:38:51 +0200 Subject: [PATCH 4/4] Add manual linter workflow trigger Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- .github/workflows/Linter.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/Linter.yml b/.github/workflows/Linter.yml index 29948887..d86a841c 100644 --- a/.github/workflows/Linter.yml +++ b/.github/workflows/Linter.yml @@ -2,7 +2,9 @@ name: Linter run-name: "Linter - [${{ github.event.pull_request.title }} #${{ github.event.pull_request.number }}] by @${{ github.actor }}" -on: [pull_request] +on: + pull_request: + workflow_dispatch: concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -30,6 +32,7 @@ jobs: FILTER_REGEX_EXCLUDE: 'tests/src(TestRepo|WithManifestTestRepo)/src/classes/public/.*\.ps1$' VALIDATE_BIOME_FORMAT: false VALIDATE_GITHUB_ACTIONS: false + VALIDATE_GITHUB_ACTIONS_ZIZMOR: false VALIDATE_JSCPD: false VALIDATE_JSON_PRETTIER: false VALIDATE_MARKDOWN_PRETTIER: false