Skip to content

🔧 [CI]: Update Build-Site job dependencies and conditions in CI workf… #5

🔧 [CI]: Update Build-Site job dependencies and conditions in CI workf…

🔧 [CI]: Update Build-Site job dependencies and conditions in CI workf… #5

Workflow file for this run

name: Process-PSModule - CI
on:
workflow_call:
secrets:
APIKey:
description: The API key for the PowerShell Gallery.
required: true
TEST_APP_ENT_CLIENT_ID:
description: The client ID of an Enterprise GitHub App for running tests.
required: false
TEST_APP_ENT_PRIVATE_KEY:
description: The private key of an Enterprise GitHub App for running tests.
required: false
TEST_APP_ORG_CLIENT_ID:
description: The client ID of an Organization GitHub App for running tests.
required: false
TEST_APP_ORG_PRIVATE_KEY:
description: The private key of an Organization GitHub App for running tests.
required: false
TEST_USER_ORG_FG_PAT:
description: The fine-grained personal access token with org access for running tests.
required: false
TEST_USER_USER_FG_PAT:
description: The fine-grained personal access token with user account access for running tests.
required: false
TEST_USER_PAT:
description: The classic personal access token for running tests.
required: false
inputs:
Name:
type: string
description: The name of the module to process. Scripts default to the repository name if nothing is specified.
required: false
SettingsPath:
type: string
description: The path to the settings file. Settings in the settings file take precedence over the action inputs.
required: false
default: .github/PSModule.yml
Debug:
type: boolean
description: Enable debug output.
required: false
default: false
Verbose:
type: boolean
description: Enable verbose output.
required: false
default: false
Version:
type: string
description: Specifies the version of the GitHub module to be installed. The value must be an exact version.
required: false
default: ''
Prerelease:
type: boolean
description: Whether to use a prerelease version of the 'GitHub' module.
required: false
default: false
WorkingDirectory:
type: string
description: The path to the root of the repo.
required: false
default: '.'
permissions:
contents: read # to checkout the repository
pull-requests: write # to write comments to PRs
statuses: write # to update the status of the workflow from linter
jobs:
jobs:

Check failure on line 72 in .github/workflows/CI.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/CI.yml

Invalid workflow file

You have an error in your yaml syntax on line 72
Get-Settings:
uses: ./.github/workflows/Get-Settings.yml
with:
Name: ${{ inputs.Name }}
SettingsPath: ${{ inputs.SettingsPath }}
Debug: ${{ inputs.Debug }}
Prerelease: ${{ inputs.Prerelease }}
Verbose: ${{ inputs.Verbose }}
Version: ${{ inputs.Version }}
WorkingDirectory: ${{ inputs.WorkingDirectory }}
Test-SourceCode:
if: ${{ needs.Get-Settings.outputs.SourceCodeTestSuites != '[]' }}
needs:
- Get-Settings
strategy:
fail-fast: false
matrix:
include: ${{ fromJson(needs.Get-Settings.outputs.SourceCodeTestSuites) }}
uses: ./.github/workflows/Test-SourceCode.yml
with:
RunsOn: ${{ matrix.RunsOn }}
OS: ${{ matrix.OSName }}
Name: ${{ fromJson(needs.Get-Settings.outputs.Settings).Name }}
Debug: ${{ inputs.Debug }}
Prerelease: ${{ inputs.Prerelease }}
Verbose: ${{ inputs.Verbose }}
Version: ${{ inputs.Version }}
WorkingDirectory: ${{ inputs.WorkingDirectory }}
Lint-SourceCode:
if: ${{ needs.Get-Settings.outputs.SourceCodeTestSuites != '[]' }}
needs:
- Get-Settings
strategy:
fail-fast: false
matrix:
include: ${{ fromJson(needs.Get-Settings.outputs.SourceCodeTestSuites) }}
uses: ./.github/workflows/Lint-SourceCode.yml
with:
RunsOn: ${{ matrix.RunsOn }}
OS: ${{ matrix.OSName }}
Name: ${{ fromJson(needs.Get-Settings.outputs.Settings).Name }}
Debug: ${{ inputs.Debug }}
Prerelease: ${{ inputs.Prerelease }}
Verbose: ${{ inputs.Verbose }}
Version: ${{ inputs.Version }}
WorkingDirectory: ${{ inputs.WorkingDirectory }}
Build-Module:
if: ${{ fromJson(needs.Get-Settings.outputs.Settings).Build.Module.Skip != true }}
uses: ./.github/workflows/Build-Module.yml
needs:
- Get-Settings
with:
Name: ${{ fromJson(needs.Get-Settings.outputs.Settings).Name }}
Debug: ${{ inputs.Debug }}
Prerelease: ${{ inputs.Prerelease }}
Verbose: ${{ inputs.Verbose }}
Version: ${{ inputs.Version }}
WorkingDirectory: ${{ inputs.WorkingDirectory }}
Build-Docs:
if: ${{ fromJson(needs.Get-Settings.outputs.Settings).Build.Docs.Skip != true }}
needs:
- Get-Settings
- Build-Module
uses: ./.github/workflows/Build-Docs.yml
with:
Name: ${{ fromJson(needs.Get-Settings.outputs.Settings).Name }}
Debug: ${{ inputs.Debug }}
Prerelease: ${{ inputs.Prerelease }}
Verbose: ${{ inputs.Verbose }}
Version: ${{ inputs.Version }}
WorkingDirectory: ${{ inputs.WorkingDirectory }}
Build-Site:
if: ${{ fromJson(needs.Get-Settings.outputs.Settings).Build.Site.Skip != true }}
needs:
- Get-Settings
- Build-Docs
uses: ./.github/workflows/Build-Site.yml
with:
Name: ${{ fromJson(needs.Get-Settings.outputs.Settings).Name }}
Debug: ${{ inputs.Debug }}
Prerelease: ${{ inputs.Prerelease }}
Verbose: ${{ inputs.Verbose }}
Version: ${{ inputs.Version }}
WorkingDirectory: ${{ inputs.WorkingDirectory }}
Test-Module:
if: ${{ needs.Build-Module.result == 'success' && !cancelled() && needs.Get-Settings.outputs.PSModuleTestSuites != '[]' }}
needs:
- Build-Module
- Get-Settings
strategy:
fail-fast: false
matrix:
include: ${{ fromJson(needs.Get-Settings.outputs.PSModuleTestSuites) }}
uses: ./.github/workflows/Test-Module.yml
secrets: inherit
with:
RunsOn: ${{ matrix.RunsOn }}
OS: ${{ matrix.OSName }}
Name: ${{ fromJson(needs.Get-Settings.outputs.Settings).Name }}
Debug: ${{ inputs.Debug }}
Prerelease: ${{ inputs.Prerelease }}
Verbose: ${{ inputs.Verbose }}
Version: ${{ inputs.Version }}
WorkingDirectory: ${{ inputs.WorkingDirectory }}
Test-ModuleLocal:
if: ${{ needs.Build-Module.result == 'success' && !cancelled() && needs.Get-Settings.outputs.ModuleTestSuites != '[]' }}
needs:
- Build-Module
- Get-Settings
strategy:
fail-fast: false
matrix:
include: ${{ fromJson(needs.Get-Settings.outputs.ModuleTestSuites) }}
uses: ./.github/workflows/Test-ModuleLocal.yml
secrets: inherit
with:
RunsOn: ${{ matrix.RunsOn }}
OS: ${{ matrix.OSName }}
TestPath: ${{ matrix.TestPath }}
TestName: ${{ matrix.TestName }}
Name: ${{ fromJson(needs.Get-Settings.outputs.Settings).Name }}
Debug: ${{ inputs.Debug }}
Prerelease: ${{ inputs.Prerelease }}
Verbose: ${{ inputs.Verbose }}
Version: ${{ inputs.Version }}
WorkingDirectory: ${{ inputs.WorkingDirectory }}
Get-TestResults:
if: needs.Get-Settings.result == 'success' && !fromJson(needs.Get-Settings.outputs.Settings).Test.TestResults.Skip && (needs.Get-Settings.outputs.SourceCodeTestSuites != '[]' || needs.Get-Settings.outputs.PSModuleTestSuites != '[]' || needs.Get-Settings.outputs.ModuleTestSuites != '[]') && (always() && !cancelled())
needs:
- Get-Settings
- Test-SourceCode
- Lint-SourceCode
- Test-Module
- Test-ModuleLocal
uses: ./.github/workflows/Get-TestResults.yml
secrets: inherit
with:
ModuleTestSuites: ${{ needs.Get-Settings.outputs.ModuleTestSuites }}
SourceCodeTestSuites: ${{ needs.Get-Settings.outputs.SourceCodeTestSuites }}
PSModuleTestSuites: ${{ needs.Get-Settings.outputs.PSModuleTestSuites }}
Debug: ${{ inputs.Debug }}
Prerelease: ${{ inputs.Prerelease }}
Verbose: ${{ inputs.Verbose }}
Version: ${{ inputs.Version }}
Get-CodeCoverage:
if: needs.Get-Settings.result == 'success' && !fromJson(needs.Get-Settings.outputs.Settings).Test.CodeCoverage.Skip && (needs.Get-Settings.outputs.PSModuleTestSuites != '[]' || needs.Get-Settings.outputs.ModuleTestSuites != '[]') && (always() && !cancelled())
needs:
- Get-Settings
- Test-Module
- Test-ModuleLocal
uses: ./.github/workflows/Get-CodeCoverage.yml
secrets: inherit
with:
CodeCoveragePercentTarget: ${{ fromJson(needs.Get-Settings.outputs.Settings).Test.CodeCoverage.PercentTarget }}
StepSummary_Mode: ${{ fromJson(needs.Get-Settings.outputs.Settings).Test.CodeCoverage.StepSummaryMode }}
Debug: ${{ inputs.Debug }}
Prerelease: ${{ inputs.Prerelease }}
Verbose: ${{ inputs.Verbose }}
Version: ${{ inputs.Version }}