Skip to content

Action-Test - [Introducing Get-PSModuleSettings GitHub Action #1] by @MariusStorhaug #1

Action-Test - [Introducing Get-PSModuleSettings GitHub Action #1] by @MariusStorhaug

Action-Test - [Introducing Get-PSModuleSettings GitHub Action #1] by @MariusStorhaug #1

Workflow file for this run

name: Action-Test
run-name: "Action-Test - [${{ github.event.pull_request.title }} #${{ github.event.pull_request.number }}] by @${{ github.actor }}"
on:
workflow_dispatch:
pull_request:
schedule:
- cron: '0 0 * * *'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
pull-requests: read
jobs:
ActionTestBasic:
name: Action-Test - [Basic]
runs-on: ubuntu-latest
steps:
# Need to check out as part of the test, as its a local action
- name: Checkout repo
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
- name: Action-Test
id: get-settings
uses: ./
with:
SettingsPath: './tests/PSModule.yml'
- name: Validate Settings Output
shell: pwsh
run: |
$settings = '${{ steps.get-settings.outputs.Settings }}' | ConvertFrom-Json
if (-not $settings) {
Write-Error "Settings output is empty"
exit 1
}
Write-Host "✓ Settings retrieved successfully"
Write-Host "Settings: $($settings | ConvertTo-Json -Depth 2)"
- name: Validate SourceCodeTestSuites Output
shell: pwsh
run: |
$suites = '${{ steps.get-settings.outputs.SourceCodeTestSuites }}'
if ([string]::IsNullOrEmpty($suites)) {
Write-Host "⚠ SourceCodeTestSuites is empty (this may be expected)"
} else {
$suitesObj = $suites | ConvertFrom-Json
Write-Host "✓ SourceCodeTestSuites: $($suitesObj.Count) suite(s) found"
}
- name: Validate PSModuleTestSuites Output
shell: pwsh
run: |
$suites = '${{ steps.get-settings.outputs.PSModuleTestSuites }}'
if ([string]::IsNullOrEmpty($suites)) {
Write-Host "⚠ PSModuleTestSuites is empty (this may be expected)"
} else {
$suitesObj = $suites | ConvertFrom-Json
Write-Host "✓ PSModuleTestSuites: $($suitesObj.Count) suite(s) found"
}
- name: Validate ModuleTestSuites Output
shell: pwsh
run: |
$suites = '${{ steps.get-settings.outputs.ModuleTestSuites }}'
if ([string]::IsNullOrEmpty($suites)) {
Write-Host "⚠ ModuleTestSuites is empty (this may be expected)"
} else {
$suitesObj = $suites | ConvertFrom-Json
Write-Host "✓ ModuleTestSuites: $($suitesObj.Count) suite(s) found"
}