Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
92ccb30
Configure Dependabot for daily schedule with 7-day cooldown
MariusStorhaug Jan 22, 2026
7cb78f6
🩹 [Patch]: Update action versions in action.yml for stability and com…
MariusStorhaug Jan 22, 2026
15aec0a
Add core scripts for Pester execution and initialization
MariusStorhaug Jan 25, 2026
ac24d2f
fix: Add persist-credentials: false to checkout actions
MariusStorhaug Jan 25, 2026
a63b02b
Disable JSCPD linter and remove configuration file
MariusStorhaug Jan 25, 2026
e04ff6b
Rename Auto-Release to Release-GHRepository
MariusStorhaug Jan 25, 2026
34cc6e9
Fix version comment to use patch level
MariusStorhaug Jan 25, 2026
9261729
⬆️ Update GitHub-Script to v1.7.10
MariusStorhaug Jan 25, 2026
5f5ce55
fix: Update actions/upload-artifact to v6.0.0
MariusStorhaug Jan 27, 2026
4425df9
refactor: Simplify status reporting in Action-Test workflow
MariusStorhaug Jan 27, 2026
fbd56a0
fix: Align output table formatting in README.md
MariusStorhaug Jan 27, 2026
eaf8812
fix: Simplify prescript execution in action.yml
MariusStorhaug Jan 27, 2026
ca03809
feat: Add support for prescript execution in Action-Test workflow
MariusStorhaug Jan 27, 2026
778dc2c
fix: Resolve prescript path before execution in prescript.ps1
MariusStorhaug Jan 27, 2026
8446f83
fix: Update prescript path in Action-Test workflow and add missing pr…
MariusStorhaug Jan 27, 2026
db8a863
Fix code coverage path in 2-Standard test configuration
MariusStorhaug Jan 27, 2026
ead4e65
Add unique TestSuiteName to PrescriptFile test to avoid artifact name…
MariusStorhaug Jan 27, 2026
e546ed8
refactor: Simplify test job object structure and enhance outcome comp…
MariusStorhaug Jan 27, 2026
6f4ec70
fix: Correct indentation in comments across multiple script files for…
MariusStorhaug Jan 27, 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
4 changes: 3 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,6 @@ updates:
- dependencies
- github-actions
schedule:
interval: weekly
interval: daily
cooldown:
default-days: 7
11 changes: 0 additions & 11 deletions .github/linters/.jscpd.json

This file was deleted.

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 intentionally used for GitHub Actions workflow commands and test output.
'PSMissingModuleManifestField', # This rule is not applicable until the module is built.
'PSUseToExportFieldsInManifest'
)
Expand Down
18 changes: 0 additions & 18 deletions .github/release.yml

This file was deleted.

459 changes: 136 additions & 323 deletions .github/workflows/Action-Test.yml

Large diffs are not rendered by default.

32 changes: 0 additions & 32 deletions .github/workflows/Auto-Release.yml

This file was deleted.

7 changes: 5 additions & 2 deletions .github/workflows/Linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,17 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v6
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
persist-credentials: false

- name: Lint code base
uses: super-linter/super-linter@latest
uses: super-linter/super-linter@d5b0a2ab116623730dd094f15ddc1b6b25bf7b99 # v8.3.2
env:
GITHUB_TOKEN: ${{ github.token }}
VALIDATE_BIOME_FORMAT: false
VALIDATE_JSCPD: false
VALIDATE_JSON_PRETTIER: false
VALIDATE_MARKDOWN_PRETTIER: false
VALIDATE_YAML_PRETTIER: false
37 changes: 37 additions & 0 deletions .github/workflows/Release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Release

run-name: "Release - [${{ github.event.pull_request.title }} #${{ github.event.pull_request.number }}] by @${{ github.actor }}"

on:
pull_request:
branches:
- main
types:
- closed
- opened
- reopened
- synchronize
- labeled
paths:
- 'action.yml'
- 'src/**'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: write # Required to create releases
pull-requests: write # Required to create comments on the PRs

jobs:
Release:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false

- name: Release
uses: PSModule/Release-GHRepository@88c70461c8f16cc09682005bcf3b7fca4dd8dc1a # v2.0.1
140 changes: 70 additions & 70 deletions README.md

Large diffs are not rendered by default.

15 changes: 8 additions & 7 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ runs:
using: composite
steps:
- name: Invoke-Pester (init)
uses: PSModule/GitHub-Script@v1
uses: PSModule/GitHub-Script@0097f3bbe3f413f3b577b9bcc600727b0ca3201a # v1.7.10
env:
PSMODULE_INVOKE_PESTER_INPUT_Path: ${{ inputs.Path }}
PSMODULE_INVOKE_PESTER_INPUT_Run_Path: ${{ inputs.Run_Path }}
Expand Down Expand Up @@ -341,7 +341,7 @@ runs:
Name: Invoke-Pester
Script: |
# Invoke-Pester (init)
${{ github.action_path }}/scripts/init.ps1
${{ github.action_path }}/src/init.ps1

- name: Invoke-Pester (exec)
shell: pwsh
Expand All @@ -355,14 +355,15 @@ runs:
PSMODULE_INVOKE_PESTER_INPUT_StepSummary_ShowConfiguration: ${{ inputs.StepSummary_ShowConfiguration }}
PSMODULE_INVOKE_PESTER_INPUT_Debug: ${{ inputs.Debug }}
PSMODULE_INVOKE_PESTER_INPUT_Verbose: ${{ inputs.Verbose }}
PSMODULE_INVOKE_PESTER_INPUT_Prescript: ${{ inputs.Prescript }}
id: test
run: |
# Invoke-Pester (exec)
${{ inputs.Prescript }}
${{ github.action_path }}/scripts/exec.ps1
${{ github.action_path }}/src/prescript.ps1
${{ github.action_path }}/src/exec.ps1

- name: Upload test results - [${{ steps.test.outputs.TestSuiteName }}-TestResults]
uses: actions/upload-artifact@v5
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
if: ${{ steps.test.outputs.TestResultEnabled == 'true' && (success() || failure()) }}
with:
name: ${{ steps.test.outputs.TestSuiteName }}-TestResults
Expand All @@ -371,7 +372,7 @@ runs:
if-no-files-found: error

- name: Upload code coverage report - [${{ steps.test.outputs.TestSuiteName }}-CodeCoverage]
uses: actions/upload-artifact@v5
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
if: ${{ steps.test.outputs.CodeCoverageEnabled == 'true' && (success() || failure()) }}
with:
name: ${{ steps.test.outputs.TestSuiteName }}-CodeCoverage
Expand All @@ -398,4 +399,4 @@ runs:
PSMODULE_INVOKE_PESTER_INTERNAL_TotalCount: ${{ steps.test.outputs.TotalCount }}
run: |
# Status
${{ github.action_path }}/scripts/status.ps1
${{ github.action_path }}/src/status.ps1
File renamed without changes.
File renamed without changes.
File renamed without changes.
32 changes: 32 additions & 0 deletions src/prescript.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<#
.DESCRIPTION
Executes a prescript that can be either an inline script or a path to a script file.
Safely handles both cases by checking if the input is a valid file path first.
#>

[CmdletBinding()]
param()

$prescript = $env:PSMODULE_INVOKE_PESTER_INPUT_Prescript

# Exit early if prescript is null or empty
if ([string]::IsNullOrWhiteSpace($prescript)) {
Write-Verbose 'No prescript provided, skipping execution.'
return
}

Write-Host '::group::Prescript - Execution'

# Check if the prescript is a path to an existing file
if (Test-Path -Path $prescript -PathType Leaf) {
$scriptPath = Resolve-Path -Path $prescript
Write-Host "Executing prescript from file: [$scriptPath]"
& $scriptPath
} else {
Write-Host 'Executing inline prescript'
# Use ScriptBlock::Create for safer execution than Invoke-Expression
$scriptBlock = [scriptblock]::Create($prescript)
& $scriptBlock
}

Write-Host '::endgroup::'
File renamed without changes.
1 change: 1 addition & 0 deletions tests/2-Standard/Emoji.Configuration.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
}
CodeCoverage = @{
Enabled = $true
Path = "$PSScriptRoot/Emoji.psm1"
}
Output = @{
CIFormat = 'Auto'
Expand Down
10 changes: 10 additions & 0 deletions tests/Prescript.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<#
.DESCRIPTION
Sample prescript file used for testing the file-based prescript execution.
#>

[CmdletBinding()]
param()

Write-Host 'This prescript was loaded from a file!'
Write-Host "Current working directory: $PWD"
11 changes: 11 additions & 0 deletions tests/Show-Status.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<#
.DESCRIPTION
Displays the outcome and conclusion of an action step.
Used by workflow tests to verify action execution results.
#>

[CmdletBinding()]
param()

Write-Host "Outcome: $env:OUTCOME"
Write-Host "Conclusion: $env:CONCLUSION"
Loading
Loading