Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions .github/workflows/Workflow-Test-Default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
paths:
- '.github/actions/**'
- '.github/workflows/**'
- 'tests/srcTestRepo/**'
- '!.github/workflows/Release.yml'
- '!.github/workflows/Linter.yml'
schedule:
Expand Down Expand Up @@ -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"
}
}
41 changes: 41 additions & 0 deletions .github/workflows/Workflow-Test-WithManifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
paths:
- '.github/actions/**'
- '.github/workflows/**'
- 'tests/srcWithManifestTestRepo/**'
- '!.github/workflows/Release.yml'
- '!.github/workflows/Linter.yml'
schedule:
Expand Down Expand Up @@ -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"
}
}
10 changes: 10 additions & 0 deletions tests/srcTestRepo/src/functions/public/index.md
Original file line number Diff line number Diff line change
@@ -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.
10 changes: 10 additions & 0 deletions tests/srcWithManifestTestRepo/src/functions/public/index.md
Original file line number Diff line number Diff line change
@@ -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.
Loading