Skip to content
Merged
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
5 changes: 4 additions & 1 deletion .github/workflows/Linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down Expand Up @@ -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
Expand Down
44 changes: 44 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,46 @@ 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
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 = @(
'# 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 (-not $content.Contains($snippet)) {
throw 'Expected snippet not found in generated root ' +
"Functions index: $snippet"
}
}
44 changes: 44 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,46 @@ 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
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 = @(
'# 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 (-not $content.Contains($snippet)) {
throw 'Expected snippet not found in generated root ' +
"Functions index: $snippet"
}
}
9 changes: 9 additions & 0 deletions tests/srcTestRepo/src/functions/public/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
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.
9 changes: 9 additions & 0 deletions tests/srcWithManifestTestRepo/src/functions/public/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
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