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
13 changes: 13 additions & 0 deletions .github/workflows/Workflow-Test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Verify Workflow

on:
workflow_call:
push:
paths:
- workflow.yml
- .github/workflows/Workflow-Test.yml

jobs:
DefaultTest:
uses: ./.github/workflows/workflow.yml
secrets: inherit
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@
name: Process modules in repo
name: Process-PSModule

on:
workflow_call:
secrets:
APIKey:
description: 'The API key to use when publishing modules'
description: The API key to use when publishing modules
required: true
GH_TOKEN:
description: 'The GitHub token to use when testing and modules'
description: The GitHub token to use when testing and modules
required: false
inputs:
TestModuleSkip:
type: boolean
description: 'Skip testing built module'
description: Skip testing built module
required: false
default: false
TestModuleErrorAction:
type: string
description: 'The ErrorActionPreference to use when running tests on built module'
description: The ErrorActionPreference to use when running tests on built module
required: false
default: 'Stop'
default: Stop
TestSrcSkip:
type: boolean
description: 'Skip testing source code'
description: Skip testing source code
required: false
default: false
TestSrcErrorAction:
type: string
description: 'The ErrorActionPreference to use when running tests on source code'
description: The ErrorActionPreference to use when running tests on source code
required: false
default: 'Stop'
default: Stop
Version:
type: string
description: 'The version of the module to process'
description: The version of the PSModule.FX to use
required: false

jobs:
Expand All @@ -43,7 +43,7 @@ jobs:
- name: Checkout Code
uses: actions/checkout@v4

- name: 'Get-PSModuleNames'
- name: Get-PSModuleNames
id: Get-PSModuleNames
shell: pwsh
run: |
Expand All @@ -60,7 +60,7 @@ jobs:
ModuleNames: ${{ steps.Get-PSModuleNames.outputs.ModuleNames }}

Process-PSModule:
name: 'Process module'
name: Process module
runs-on: ubuntu-latest
needs:
- Get-PSModuleNames
Expand All @@ -82,7 +82,7 @@ jobs:
if: ${{ inputs.TestSrcSkip == false }}
with:
Name: ${{ matrix.ModuleName }}
Path: 'src'
Path: src
ErrorAction: ${{ inputs.TestSrcErrorAction }}

- name: Build module
Expand All @@ -95,9 +95,9 @@ jobs:
if: ${{ inputs.TestModuleSkip == false }}
with:
Name: ${{ matrix.ModuleName }}
Path: 'outputs'
Path: outputs
ErrorAction: ${{ inputs.TestModuleErrorAction }}
CustomTestsPath: 'tests'
CustomTestsPath: tests
env:
GH_TOKEN: ${{ github.token }} # Used for GitHub CLI authentication

Expand Down
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,11 @@

Repository for the PSModule Process-PSModule workflow template.
It stiches together the Initialize, Build, Test, and Publish workflows to create a complete CI/CD pipeline for PowerShell modules.

## Usage

To be added.

## More information about workflow templates

- [Reusing workflows](https://docs.github.com/en/actions/using-workflows/reusing-workflows)