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
123 changes: 82 additions & 41 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,30 +48,30 @@ on:
description: Defines what types of tests to skip. Allowed values are 'All', 'SourceCode', 'Module', 'None', 'macOS', 'Windows', 'Linux'.
required: false
default: None
Version:
type: string
description: The version of the 'GitHub' module to use. Defaults to latest version.
PublishDocs:
type: boolean
description: Whether to publish the documentation using MkDocs and GitHub Pages.
required: false
Prerelease:
default: true
Debug:
type: boolean
description: Whether to use a prerelease version of the 'GitHub' module.
description: Enable debug output.
required: false
default: false
PublishDocs:
Verbose:
type: boolean
description: Whether to publish the documentation using MkDocs and GitHub Pages.
description: Enable verbose output.
required: false
default: true
VerbosePreference:
default: false
Version:
type: string
description: "The preference for verbose output. Allowed values: 'SilentlyContinue', 'Stop', 'Continue', 'Inquire', 'Break', 'Ignore','Suspend'."
description: Specifies the version of the GitHub module to be installed. The value must be an exact version.
required: false
default: 'SilentlyContinue'
DebugPreference:
type: string
description: "The preference for debug output. Allowed values: 'SilentlyContinue', 'Stop', 'Continue', 'Inquire', 'Break', 'Ignore','Suspend'."
Prerelease:
type: boolean
description: Whether to use a prerelease version of the 'GitHub' module.
required: false
default: 'SilentlyContinue'
default: false

env:
GITHUB_TOKEN: ${{ github.token }} # Used for GitHub CLI authentication
Expand All @@ -97,8 +97,10 @@ jobs:
- name: Initialize environment
uses: PSModule/Initialize-PSModule@v1
with:
Version: ${{ inputs.Version }}
Debug: ${{ inputs.Debug }}
Prerelease: ${{ inputs.Prerelease }}
Verbose: ${{ inputs.Verbose }}
Version: ${{ inputs.Version }}

- name: Test source code
id: test
Expand All @@ -107,24 +109,26 @@ jobs:
Name: ${{ inputs.Name }}
Path: ${{ inputs.Path }}
TestType: SourceCode
VerbosePreference: ${{ inputs.VerbosePreference }}
DebugPreference: ${{ inputs.DebugPreference }}
Debug: ${{ inputs.Debug }}
Prerelease: ${{ inputs.Prerelease }}
Verbose: ${{ inputs.Verbose }}
Version: ${{ inputs.Version }}

TestSourceCode-pwsh-macos-latest:
name: Test source code (pwsh, macos-latest)
if: ${{ !(contains(inputs.SkipTests, 'All') || contains(inputs.SkipTests, 'SourceCode' ) || contains(inputs.SkipTests, 'macOS')) }}
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 }}
Debug: ${{ inputs.Debug }}
Prerelease: ${{ inputs.Prerelease }}
Verbose: ${{ inputs.Verbose }}
Version: ${{ inputs.Version }}

- name: Test source code
id: test
Expand All @@ -133,24 +137,26 @@ jobs:
Name: ${{ inputs.Name }}
Path: ${{ inputs.Path }}
TestType: SourceCode
VerbosePreference: ${{ inputs.VerbosePreference }}
DebugPreference: ${{ inputs.DebugPreference }}
Debug: ${{ inputs.Debug }}
Prerelease: ${{ inputs.Prerelease }}
Verbose: ${{ inputs.Verbose }}
Version: ${{ inputs.Version }}

TestSourceCode-pwsh-windows-latest:
name: Test source code (pwsh, windows-latest)
if: ${{ !(contains(inputs.SkipTests, 'All' ) || contains(inputs.SkipTests, 'SourceCode' ) || contains(inputs.SkipTests, 'Windows')) }}
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 }}
Debug: ${{ inputs.Debug }}
Prerelease: ${{ inputs.Prerelease }}
Verbose: ${{ inputs.Verbose }}
Version: ${{ inputs.Version }}

- name: Test source code
id: test
Expand All @@ -159,8 +165,10 @@ jobs:
Name: ${{ inputs.Name }}
Path: ${{ inputs.Path }}
TestType: SourceCode
VerbosePreference: ${{ inputs.VerbosePreference }}
DebugPreference: ${{ inputs.DebugPreference }}
Debug: ${{ inputs.Debug }}
Prerelease: ${{ inputs.Prerelease }}
Verbose: ${{ inputs.Verbose }}
Version: ${{ inputs.Version }}

BuildModule:
name: Build module
Expand All @@ -177,9 +185,10 @@ jobs:
- name: Initialize environment
uses: PSModule/Initialize-PSModule@v1
with:
Verbose: true
Version: ${{ inputs.Version }}
Debug: ${{ inputs.Debug }}
Prerelease: ${{ inputs.Prerelease }}
Verbose: ${{ inputs.Verbose }}
Version: ${{ inputs.Version }}

- name: Build module
uses: PSModule/Build-PSModule@v2
Expand All @@ -188,6 +197,10 @@ jobs:
Path: ${{ inputs.Path }}
ModulesOutputPath: ${{ inputs.ModulesOutputPath }}
DocsOutputPath: ${{ inputs.DocsOutputPath }}
Debug: ${{ inputs.Debug }}
Prerelease: ${{ inputs.Prerelease }}
Verbose: ${{ inputs.Verbose }}
Version: ${{ inputs.Version }}

# This is necessary as there is no way to get output from a matrix job
TestModule-pwsh-ubuntu-latest:
Expand All @@ -204,8 +217,10 @@ jobs:
- name: Initialize environment
uses: PSModule/Initialize-PSModule@v1
with:
Version: ${{ inputs.Version }}
Debug: ${{ inputs.Debug }}
Prerelease: ${{ inputs.Prerelease }}
Verbose: ${{ inputs.Verbose }}
Version: ${{ inputs.Version }}

- name: Download module artifact
uses: actions/download-artifact@v4
Expand All @@ -221,8 +236,10 @@ jobs:
Name: ${{ inputs.Name }}
Path: ${{ inputs.ModulesOutputPath }}
TestType: Module
VerbosePreference: ${{ inputs.VerbosePreference }}
DebugPreference: ${{ inputs.DebugPreference }}
Debug: ${{ inputs.Debug }}
Prerelease: ${{ inputs.Prerelease }}
Verbose: ${{ inputs.Verbose }}
Version: ${{ inputs.Version }}

- name: Status
shell: pwsh
Expand All @@ -248,8 +265,10 @@ jobs:
- name: Initialize environment
uses: PSModule/Initialize-PSModule@v1
with:
Version: ${{ inputs.Version }}
Debug: ${{ inputs.Debug }}
Prerelease: ${{ inputs.Prerelease }}
Verbose: ${{ inputs.Verbose }}
Version: ${{ inputs.Version }}

- name: Download module artifact
uses: actions/download-artifact@v4
Expand All @@ -265,8 +284,10 @@ jobs:
Name: ${{ inputs.Name }}
Path: ${{ inputs.ModulesOutputPath }}
TestType: Module
VerbosePreference: ${{ inputs.VerbosePreference }}
DebugPreference: ${{ inputs.DebugPreference }}
Debug: ${{ inputs.Debug }}
Prerelease: ${{ inputs.Prerelease }}
Verbose: ${{ inputs.Verbose }}
Version: ${{ inputs.Version }}

- name: Status
shell: pwsh
Expand All @@ -292,8 +313,10 @@ jobs:
- name: Initialize environment
uses: PSModule/Initialize-PSModule@v1
with:
Version: ${{ inputs.Version }}
Debug: ${{ inputs.Debug }}
Prerelease: ${{ inputs.Prerelease }}
Verbose: ${{ inputs.Verbose }}
Version: ${{ inputs.Version }}

- name: Download module artifact
uses: actions/download-artifact@v4
Expand All @@ -309,8 +332,10 @@ jobs:
Name: ${{ inputs.Name }}
Path: ${{ inputs.ModulesOutputPath }}
TestType: Module
VerbosePreference: ${{ inputs.VerbosePreference }}
DebugPreference: ${{ inputs.DebugPreference }}
Debug: ${{ inputs.Debug }}
Prerelease: ${{ inputs.Prerelease }}
Verbose: ${{ inputs.Verbose }}
Version: ${{ inputs.Version }}

- name: Status
shell: pwsh
Expand All @@ -337,8 +362,10 @@ jobs:
- name: Initialize environment
uses: PSModule/Initialize-PSModule@v1
with:
Version: ${{ inputs.Version }}
Debug: ${{ inputs.Debug }}
Prerelease: ${{ inputs.Prerelease }}
Verbose: ${{ inputs.Verbose }}
Version: ${{ inputs.Version }}

- name: Download module artifact
uses: actions/download-artifact@v4
Expand All @@ -349,6 +376,10 @@ jobs:
- name: Summerize tests
uses: PSModule/GitHub-Script@v1
with:
Debug: ${{ inputs.Debug }}
Prerelease: ${{ inputs.Prerelease }}
Verbose: ${{ inputs.Verbose }}
Version: ${{ inputs.Version }}
Script: |
LogGroup -Name 'Test analysis' {

Expand Down Expand Up @@ -491,8 +522,10 @@ jobs:
- name: Initialize environment
uses: PSModule/Initialize-PSModule@v1
with:
Version: ${{ inputs.Version }}
Debug: ${{ inputs.Debug }}
Prerelease: ${{ inputs.Prerelease }}
Verbose: ${{ inputs.Verbose }}
Version: ${{ inputs.Version }}

- name: Download docs artifact
uses: actions/download-artifact@v4
Expand All @@ -516,6 +549,10 @@ jobs:
- name: Structure site
uses: PSModule/GitHub-Script@v1
with:
Debug: ${{ inputs.Debug }}
Prerelease: ${{ inputs.Prerelease }}
Verbose: ${{ inputs.Verbose }}
Version: ${{ inputs.Version }}
Script: |
$moduleName = [string]::IsNullOrEmpty('${{ inputs.Name }}') ? $env:GITHUB_REPOSITORY_NAME : '${{ inputs.Name }}'
$ModuleSourcePath = Join-Path $PWD -ChildPath '${{ inputs.Path }}'
Expand Down Expand Up @@ -572,6 +609,10 @@ jobs:
uses: PSModule/GitHub-Script@v1
with:
WorkingDirectory: ${{ inputs.SiteOutputPath }}
Debug: ${{ inputs.Debug }}
Prerelease: ${{ inputs.Prerelease }}
Verbose: ${{ inputs.Verbose }}
Version: ${{ inputs.Version }}
Script: |
LogGroup 'Build docs - mkdocs build - content' {
Show-FileContent -Path mkdocs.yml
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/Workflow-Test-Default-CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@ 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]
on:
workflow_dispatch:
pull_request:
schedule:
- cron: '0 0 * * *'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/Workflow-Test-Default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@ name: Workflow-Test [Default]

run-name: "Workflow-Test [Default] - [${{ github.event.pull_request.title }} #${{ github.event.pull_request.number }}] by @${{ github.actor }}"

on: [pull_request]
on:
workflow_dispatch:
pull_request:
schedule:
- cron: '0 0 * * *'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/Workflow-Test-WithManifest-CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@ 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]
on:
workflow_dispatch:
pull_request:
schedule:
- cron: '0 0 * * *'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/Workflow-Test-WithManifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@ name: Workflow-Test [WithManifest]

run-name: "Workflow-Test [WithManifest] - [${{ github.event.pull_request.title }} #${{ github.event.pull_request.number }}] by @${{ github.actor }}"

on: [pull_request]
on:
workflow_dispatch:
pull_request:
schedule:
- cron: '0 0 * * *'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down
Loading