Skip to content

Releases: PSModule/Get-PSModuleSettings

v1.0.0

11 Jan 16:11
77c3c59

Choose a tag to compare

🌟[Major] Introducing Get-PSModuleSettings GitHub Action (#1)

This release introduces a new GitHub Action, Get-PSModuleSettings, which replaces the previous template action in PSModule/Process-PSModule. The action is designed to load and process PowerShell module workflow settings from configuration files, compute job run conditions, and output structured settings and test suite information for use in CI pipelines.

How It Works

The Get-PSModuleSettings action:

  1. Loads settings from a specified configuration file (supporting JSON, YAML, or PSD1 formats)
  2. Validates settings against a comprehensive JSON schema to ensure correctness
  3. Applies defaults for any missing configuration values
  4. Generates test suite matrices for multiple operating systems (Linux, macOS, Windows) based on test discovery
  5. Computes job run conditions based on PR state (open, updated, merged, abandoned)
  6. Outputs structured JSON containing all settings, test suites, and run conditions for downstream workflow steps

Configuration Format Support

The action supports three configuration formats:

  • JSON - Standard JSON configuration files
  • YAML/YML - Human-readable YAML format
  • PSD1 - PowerShell Data File format (native PowerShell hashtables)

Test Suite Generation

The action automatically discovers and categorizes tests into three types:

  • SourceCode tests - Static analysis and linting of source code
  • PSModule tests - Tests for the built PowerShell module
  • Module tests - Integration and functional tests with test matrices for each OS

Test discovery supports:

  • *.Configuration.ps1 - Test configuration files
  • *.Container.ps1 - Test container files
  • *.Tests.ps1 - Standard Pester test files

Job Run Conditions

The action calculates intelligent run conditions for each workflow job based on:

  • Pull request state (open, updated, merged, abandoned)
  • Configuration skip flags
  • Test suite availability
  • Ensures abandoned PRs don't waste CI resources