Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
902b6e2
remove placeholder README for tests
MariusStorhaug Jan 7, 2026
aeb8289
refactor: update action.yml to define Get-PSModuleSettings with appro…
MariusStorhaug Jan 7, 2026
6e056e1
feat: enhance workflow with settings validation and add PSModule test…
MariusStorhaug Jan 7, 2026
5094e04
refactor: simplify job run conditions output and add PSModule test co…
MariusStorhaug Jan 7, 2026
9d59f8a
feat: add settings validation script and JSON schema for PSModule con…
MariusStorhaug Jan 7, 2026
c23444d
feat: enhance test scripts with detailed documentation and improve di…
MariusStorhaug Jan 7, 2026
397c8a3
feat: add documentation for Get-TestItemsFromFolder function to impro…
MariusStorhaug Jan 7, 2026
14d20f5
docs: improve formatting of documentation for Get-TestItemsFromFolder…
MariusStorhaug Jan 7, 2026
4862d21
feat: optimize module test suite handling by using ArrayList for dyna…
MariusStorhaug Jan 7, 2026
e3dc33a
feat: enhance documentation for Get-TestItemsFromFolder and Find-Test…
MariusStorhaug Jan 7, 2026
6054183
feat: add OutputType attributes to improve cmdlet documentation for t…
MariusStorhaug Jan 7, 2026
833426f
feat: update OutputType attribute to support multiple return types fo…
MariusStorhaug Jan 7, 2026
772df0d
feat: refactor main.ps1 to streamline settings import and enhance tes…
MariusStorhaug Jan 10, 2026
cca4a29
feat: refactor variable assignments and enhance settings logging stru…
MariusStorhaug Jan 10, 2026
8808298
feat: refactor test suite handling to improve settings structure and …
MariusStorhaug Jan 10, 2026
3c5574a
Update tests/Validate-Settings.ps1
MariusStorhaug Jan 10, 2026
1db6e3b
fix: remove unnecessary reinstall flag from Install-PSResource and fo…
MariusStorhaug Jan 10, 2026
441721c
Merge branch 'init' of https://github.com/PSModule/Get-PSModuleSettin…
MariusStorhaug Jan 10, 2026
c4d14dd
feat: add JSON schema validation for settings and update README with …
MariusStorhaug Jan 10, 2026
7103479
fix: correct property name for CodeCoverage StepSummaryMode in settings
MariusStorhaug Jan 10, 2026
254a83d
fix: correct Join-Path usage for schema path in Validate-Settings.ps1…
MariusStorhaug Jan 10, 2026
5a5dc75
fix: remove unnecessary newline characters in output messages in Vali…
MariusStorhaug Jan 10, 2026
6bfdd34
refactor: clean up comments and documentation in Validate-Settings.ps1
MariusStorhaug Jan 10, 2026
5dc37f8
refactor: simplify Run object creation and logging in main.ps1
MariusStorhaug Jan 10, 2026
5930534
feat: add TestPath and TestName properties to settings schema
MariusStorhaug Jan 11, 2026
ed389fd
refactor: reorganize and enhance settings structure in Settings.json
MariusStorhaug Jan 11, 2026
1769e3c
feat: add detailed test configurations for multiple OS in Settings.json
MariusStorhaug Jan 11, 2026
563d394
refactor: remove redundant properties from macOS test configuration i…
MariusStorhaug Jan 11, 2026
4f7ce05
refactor: improve error handling for null property mismatches in Vali…
MariusStorhaug Jan 11, 2026
d5712b2
refactor: standardize string quotes in Validate-Settings.ps1
MariusStorhaug Jan 11, 2026
8d28ca6
refactor: enhance error reporting for structure validation in Validat…
MariusStorhaug Jan 11, 2026
e128f3f
feat: add test path and name for macOS environment in Settings.json
MariusStorhaug Jan 11, 2026
d3beec2
feat: add initial test files for Environment and PSModuleTest
MariusStorhaug Jan 11, 2026
696fecf
refactor: remove unused structure validation logic from Validate-Sett…
MariusStorhaug Jan 11, 2026
41ca109
feat: add valid and invalid test scenarios for PSModule configuration…
MariusStorhaug Jan 11, 2026
988ea7a
feat: enhance action validation and output schema checks in workflows
MariusStorhaug Jan 11, 2026
5924947
feat: add PSModule.yml for invalid percent target test scenario
MariusStorhaug Jan 11, 2026
92a9213
refactor: remove invalid test configuration and update license year
MariusStorhaug Jan 11, 2026
9f94733
feat: add Name input parameter to action and update main script to ha…
MariusStorhaug Jan 11, 2026
28c75bb
fix: update schema ID to use raw GitHub URL for Settings.schema.json
MariusStorhaug Jan 11, 2026
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
1 change: 1 addition & 0 deletions .github/linters/.powershell-psscriptanalyzer.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
}
}
ExcludeRules = @(
'PSAvoidUsingWriteHost', # Write-Host is acceptable in GitHub Actions runners
'PSMissingModuleManifestField', # This rule is not applicable until the module is built.
'PSUseToExportFieldsInManifest'
)
Expand Down
33 changes: 30 additions & 3 deletions .github/workflows/Action-Test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ permissions:
pull-requests: read

jobs:
ActionTestBasic:
name: Action-Test - [Basic]
ActionTestValid:
name: Action-Test - [Valid Configuration]
runs-on: ubuntu-latest
steps:
# Need to check out as part of the test, as its a local action
Expand All @@ -28,6 +28,33 @@ jobs:
persist-credentials: false

- name: Action-Test
id: get-settings
uses: ./
with:
Subject: PSModule
SettingsPath: './tests/scenarios/valid/PSModule.yml'

ActionTestInvalidMissingTestConfig:
name: Action-Test - [Invalid - Missing Test Config]
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 (Expect Failure)
id: get-settings
continue-on-error: true
uses: ./
with:
SettingsPath: './tests/scenarios/invalid-percent-target/PSModule.yml'

- name: Verify Action Failed as Expected
shell: pwsh
run: |
if ('${{ steps.get-settings.outcome }}' -eq 'success') {
Write-Error 'Expected action to fail for invalid configuration, but it succeeded'
exit 1
}
Write-Host '✓ Action failed as expected for invalid configuration'
4 changes: 4 additions & 0 deletions .github/workflows/Linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ jobs:
uses: super-linter/super-linter@d5b0a2ab116623730dd094f15ddc1b6b25bf7b99 # v8.3.2
env:
GITHUB_TOKEN: ${{ github.token }}
VALIDATE_BIOME_FORMAT: false
VALIDATE_BIOME_LINT: false
VALIDATE_GITHUB_ACTIONS_ZIZMOR: false
VALIDATE_JSCPD: false
VALIDATE_JSON_PRETTIER: false
VALIDATE_MARKDOWN_PRETTIER: false
VALIDATE_YAML_PRETTIER: false
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2025 PSModule
Copyright (c) 2026 PSModule

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
18 changes: 2 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,3 @@
# Template-Action
# Get-PSModuleSettings

A template repository for GitHub Actions

## Usage

### Inputs

### Secrets

### Outputs

### Example

```yaml
Example here
```
This GitHub Action is a part of the [PSModule framework](https://github.com/PSModule).
36 changes: 26 additions & 10 deletions action.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
name: Template-Action
description: A template action for GitHub Actions using PowerShell
name: Get-PSModuleSettings
description: Get settings for a PowerShell module workflow
author: PSModule
branding:
icon: upload-cloud
color: white
icon: settings
color: blue

inputs:
Subject:
description: The subject to greet
Name:
description: Name of the module.
required: false
SettingsPath:
description: Path to the settings file (json, yaml/yml, or psd1)
required: false
default: World
Debug:
description: Enable debug output.
required: false
Expand All @@ -30,15 +32,29 @@ inputs:
required: false
default: ${{ github.workspace }}

outputs:
Settings:
description: The complete settings object as JSON, including test suites
value: ${{ fromJson(steps.Get-PSModuleSettings.outputs.result).Settings }}

runs:
using: composite
steps:
- name: Template-Action
- name: Get-PSModuleSettings
uses: PSModule/GitHub-Script@8b9d2739d6896975c0e5448d2021ae2b94b6766a # v1.7.6
id: Get-PSModuleSettings
env:
PSMOUDLE_TEMPLATE_ACTION_INPUT_Subject: ${{ inputs.Subject }}
PSMODULE_GET_SETTINGS_INPUT_Name: ${{ inputs.Name }}
PSMODULE_GET_SETTINGS_INPUT_SettingsPath: ${{ inputs.SettingsPath }}
PSMODULE_GET_SETTINGS_INPUT_Debug: ${{ inputs.Debug }}
PSMODULE_GET_SETTINGS_INPUT_Verbose: ${{ inputs.Verbose }}
PSMODULE_GET_SETTINGS_INPUT_Version: ${{ inputs.Version }}
PSMODULE_GET_SETTINGS_INPUT_Prerelease: ${{ inputs.Prerelease }}
PSMODULE_GET_SETTINGS_INPUT_WorkingDirectory: ${{ inputs.WorkingDirectory }}
with:
Name: Template-Action
Name: Get-PSModuleSettings
ShowInfo: false
ShowOutput: true
Debug: ${{ inputs.Debug }}
Prerelease: ${{ inputs.Prerelease }}
Verbose: ${{ inputs.Verbose }}
Expand Down
Loading
Loading