$testSuitStatusIcon - $testSuitName ($formattedTestDuration)
+
+
+| Total | Passed | Failed | Skipped | Inconclusive | NotRun | Coverage |
+| ----- | ------ | ------ | ------- | ------------ | ------ | -------- |
+| $($totalTests) | $($passedTests) | $($failedTests) | $($skippedTests) | $($inconclusiveTests) | $($notRunTests) | $coverageString |
+
+"@
+
+ Write-Verbose "Processing containers [$($testResults.Containers.Count)]" -Verbose
+ # For each container, group tests by their test path parts
+ foreach ($container in $testResults.Containers) {
+ $containerPath = $container.Item.FullName
+ Write-Verbose "Processing container [$containerPath]" -Verbose
+ $containerName = (Split-Path $container.Name -Leaf) -replace '.Tests.ps1'
+ Write-Verbose "Container name: [$containerName]" -Verbose
+ $containerStatusIcon = $container.Result -eq 'Passed' ? '✅' : '❌'
+ $formattedContainerDuration = $container.Duration | Format-TimeSpan
+ $summaryMarkdown += @"
+$Indent$containerStatusIcon - $containerName ($formattedContainerDuration)
+
+
+"@
+ $containerTests = $testResults.Tests | Where-Object { $_.Block.BlockContainer.Item.FullName -eq $containerPath } | Sort-Object -Property Path
+ Write-Verbose "Processing tests [$($containerTests.Count)]" -Verbose
+
+ # Build the nested details markdown grouping tests by their test path parts
+ $groupedMarkdown = Get-GroupedTestMarkdown -Tests $containerTests -Depth 0
+ $summaryMarkdown += $groupedMarkdown
+
+ $summaryMarkdown += @'
+
+
+
+
+'@
+ }
+
+ $summaryMarkdown += @'
+
+
+
+
+'@
+ Set-GitHubStepSummary -Summary $summaryMarkdown
+}
+
+# For each property of testresults, output the value as a JSON object
+foreach ($property in $testResults.PSObject.Properties) {
+ Write-Verbose "Setting output for [$($property.Name)]"
+ $name = $property.Name
+ $value = -not [string]::IsNullOrEmpty($property.Value) ? ($property.Value | ConvertTo-Json -Depth 2 -WarningAction SilentlyContinue) : ''
+ Set-GitHubOutput -Name $name -Value $value
+}
+
+Set-GitHubOutput -Name 'TestResultEnabled' -Value $testResults.Configuration.TestResult.Enabled.Value
+Set-GitHubOutput -Name 'TestResultOutputPath' -Value $testResults.Configuration.TestResult.OutputPath.Value
+Set-GitHubOutput -Name 'TestSuiteName' -Value $testResults.Configuration.TestResult.TestSuiteName.Value
+Set-GitHubOutput -Name 'CodeCoverageEnabled' -Value $testResults.Configuration.CodeCoverage.Enabled.Value
+Set-GitHubOutput -Name 'CodeCoverageOutputPath' -Value $testResults.Configuration.CodeCoverage.OutputPath.Value
+
+exit $failedTests
diff --git a/scripts/main.sh b/scripts/main.sh
deleted file mode 100644
index 8589a85d..00000000
--- a/scripts/main.sh
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/bash
-# Run 'git add --chmod=+x scripts\main.sh' to make the script executable
-
-echo "Hello, $SUBJECT!"
diff --git a/tests/1-Simple/Emoji.Tests.ps1 b/tests/1-Simple/Emoji.Tests.ps1
new file mode 100644
index 00000000..2db4ac47
--- /dev/null
+++ b/tests/1-Simple/Emoji.Tests.ps1
@@ -0,0 +1,67 @@
+BeforeAll {
+ $emojis = @(
+ @{ Name = 'apple'; Symbol = '🍎'; Kind = 'Fruit' }
+ @{ Name = 'beaming face with smiling eyes'; Symbol = '😁'; Kind = 'Face' }
+ @{ Name = 'cactus'; Symbol = '🌵'; Kind = 'Plant' }
+ @{ Name = 'giraffe'; Symbol = '🦒'; Kind = 'Animal' }
+ @{ Name = 'pencil'; Symbol = '✏️'; Kind = 'Item' }
+ @{ Name = 'penguin'; Symbol = '🐧'; Kind = 'Animal' }
+ @{ Name = 'pensive'; Symbol = '😔'; Kind = 'Face' }
+ @{ Name = 'slightly smiling face'; Symbol = '🙂'; Kind = 'Face' }
+ @{ Name = 'smiling face with smiling eyes'; Symbol = '😊'; Kind = 'Face' }
+ ) | ForEach-Object { [PSCustomObject]$_ }
+
+ function Get-Emoji ([string]$Name = '*') {
+ $emojis | Where-Object Name -Like $Name | ForEach-Object Symbol
+ }
+}
+
+Describe 'Get-Emoji' {
+ Context 'Lookup by whole name' {
+ It 'Returns 🌵 (cactus)' {
+ Get-Emoji -Name cactus | Should -Be '🌵'
+ }
+
+ It 'Returns 🦒 (giraffe)' {
+ Get-Emoji -Name giraffe | Should -Be '🦒'
+ }
+ }
+
+ Context 'Lookup by wildcard' {
+ Context 'by prefix' {
+ BeforeAll {
+ $emojis = Get-Emoji -Name pen*
+ }
+
+ It 'Returns ✏️ (pencil)' {
+ $emojis | Should -Contain '✏️'
+ }
+
+ It 'Returns 🐧 (penguin)' {
+ $emojis | Should -Contain '🐧'
+ }
+
+ It 'Returns 😔 (pensive)' {
+ $emojis | Should -Contain '😔'
+ }
+ }
+
+ Context 'by contains' {
+ BeforeAll {
+ $emojis = Get-Emoji -Name *smiling*
+ }
+
+ It 'Returns 🙂 (slightly smiling face)' {
+ $emojis | Should -Contain '🙂'
+ }
+
+ It 'Returns 😁 (beaming face with smiling eyes)' {
+ $emojis | Should -Contain '😁'
+ }
+
+ It 'Returns 😊 (smiling face with smiling eyes)' {
+ $emojis | Should -Contain '😊'
+ }
+ }
+ }
+}
diff --git a/tests/2-Standard/Emoji.Configuration.ps1 b/tests/2-Standard/Emoji.Configuration.ps1
new file mode 100644
index 00000000..d91b1e1b
--- /dev/null
+++ b/tests/2-Standard/Emoji.Configuration.ps1
@@ -0,0 +1,15 @@
+@{
+ Run = @{
+ Path = $PSScriptRoot
+ PassThru = $true
+ }
+ TestResult = @{
+ Enabled = $true
+ TestSuiteName = 'Standard'
+ }
+ Output = @{
+ CIFormat = 'Auto'
+ StackTraceVerbosity = 'Filtered'
+ Verbosity = 'Detailed'
+ }
+}
diff --git a/tests/2-Standard/Emoji.Container.ps1 b/tests/2-Standard/Emoji.Container.ps1
new file mode 100644
index 00000000..dacb12f9
--- /dev/null
+++ b/tests/2-Standard/Emoji.Container.ps1
@@ -0,0 +1,8 @@
+@{
+ Path = Get-ChildItem -Path $PSScriptRoot -Filter *.Tests.ps1 | Select-Object -ExpandProperty FullName
+ Data = @{
+ Path = Join-Path $PSScriptRoot -ChildPath 'Emoji.psm1'
+ Debug = $false
+ Verbose = $false
+ }
+}
diff --git a/tests/2-Standard/Emoji.Tests.ps1 b/tests/2-Standard/Emoji.Tests.ps1
new file mode 100644
index 00000000..78f88ae3
--- /dev/null
+++ b/tests/2-Standard/Emoji.Tests.ps1
@@ -0,0 +1,61 @@
+[CmdletBinding()]
+param(
+ [Parameter(Mandatory)]
+ [string] $Path
+)
+
+Describe 'Emoji' {
+ It 'Module is importable' {
+ { Import-Module -Name $Path } | Should -Not -Throw
+ }
+}
+
+Describe 'Get-Emoji' {
+ Context 'Lookup by whole name' {
+ It 'Returns 🌵 (cactus)' {
+ Get-Emoji -Name cactus | Should -Be '🌵'
+ }
+
+ It 'Returns 🦒 (giraffe)' {
+ Get-Emoji -Name giraffe | Should -Be '🦒'
+ }
+ }
+
+ Context 'Lookup by wildcard' {
+ Context 'by prefix' {
+ BeforeAll {
+ $emojis = Get-Emoji -Name pen*
+ }
+
+ It 'Returns ✏️ (pencil)' {
+ $emojis | Should -Contain '✏️'
+ }
+
+ It 'Returns 🐧 (penguin)' {
+ $emojis | Should -Contain '🐧'
+ }
+
+ It 'Returns 😔 (pensive)' {
+ $emojis | Should -Contain '😔'
+ }
+ }
+
+ Context 'by contains' {
+ BeforeAll {
+ $emojis = Get-Emoji -Name *smiling*
+ }
+
+ It 'Returns 🙂 (slightly smiling face)' {
+ $emojis | Should -Contain '🙂'
+ }
+
+ It 'Returns 😁 (beaming face with smiling eyes)' {
+ $emojis | Should -Contain '😁'
+ }
+
+ It 'Returns 😊 (smiling face with smiling eyes)' {
+ $emojis | Should -Contain '😊'
+ }
+ }
+ }
+}
diff --git a/tests/2-Standard/Emoji.psm1 b/tests/2-Standard/Emoji.psm1
new file mode 100644
index 00000000..d27e0317
--- /dev/null
+++ b/tests/2-Standard/Emoji.psm1
@@ -0,0 +1,15 @@
+$script:emojis = @(
+ @{ Name = 'apple'; Symbol = '🍎'; Kind = 'Fruit' }
+ @{ Name = 'beaming face with smiling eyes'; Symbol = '😁'; Kind = 'Face' }
+ @{ Name = 'cactus'; Symbol = '🌵'; Kind = 'Plant' }
+ @{ Name = 'giraffe'; Symbol = '🦒'; Kind = 'Animal' }
+ @{ Name = 'pencil'; Symbol = '✏️'; Kind = 'Item' }
+ @{ Name = 'penguin'; Symbol = '🐧'; Kind = 'Animal' }
+ @{ Name = 'pensive'; Symbol = '😔'; Kind = 'Face' }
+ @{ Name = 'slightly smiling face'; Symbol = '🙂'; Kind = 'Face' }
+ @{ Name = 'smiling face with smiling eyes'; Symbol = '😊'; Kind = 'Face' }
+) | ForEach-Object { [PSCustomObject]$_ }
+
+function Get-Emoji ([string]$Name = '*') {
+ $script:emojis | Where-Object Name -Like $Name | ForEach-Object Symbol
+}
diff --git a/tests/3-Advanced/Animals/Animals.Container.ps1 b/tests/3-Advanced/Animals/Animals.Container.ps1
new file mode 100644
index 00000000..dce74d95
--- /dev/null
+++ b/tests/3-Advanced/Animals/Animals.Container.ps1
@@ -0,0 +1,8 @@
+@{
+ Path = Get-ChildItem -Path $PSScriptRoot -Filter *.Tests.ps1 | Select-Object -ExpandProperty FullName
+ Data = @{
+ Path = Get-ChildItem -Path $PSScriptRoot -Filter *.Data.ps1 | Select-Object -ExpandProperty FullName
+ Debug = $false
+ Verbose = $false
+ }
+}
diff --git a/tests/3-Advanced/Animals/Animals.Data.ps1 b/tests/3-Advanced/Animals/Animals.Data.ps1
new file mode 100644
index 00000000..0e070679
--- /dev/null
+++ b/tests/3-Advanced/Animals/Animals.Data.ps1
@@ -0,0 +1,8 @@
+# Animals.Settings.ps1
+$AnimalsSettings = @{
+ # Expected number of animal types for testing
+ AnimalCount = 5
+
+ # Expected list of animal names for testing
+ AnimalNames = @('Lion', 'Tiger', 'Bear', 'Elephant', 'Giraffe')
+}
diff --git a/tests/3-Advanced/Animals/Animals.Tests.ps1 b/tests/3-Advanced/Animals/Animals.Tests.ps1
new file mode 100644
index 00000000..07484f69
--- /dev/null
+++ b/tests/3-Advanced/Animals/Animals.Tests.ps1
@@ -0,0 +1,26 @@
+[CmdletBinding()]
+param(
+ [Parameter(Mandatory)]
+ [string] $Path
+)
+
+BeforeAll {
+ . $Path
+}
+
+Describe 'Animals Module Tests' {
+ Context 'Animal Count' {
+ It 'Should return the expected number of animals' {
+ $expectedCount = $AnimalsSettings.AnimalCount
+ $actualCount = $AnimalsSettings.AnimalNames.Count
+ $actualCount | Should -Be $expectedCount
+ }
+ }
+ Context 'Animal Names' {
+ It 'Should return the expected list of animal names' {
+ $expectedNames = $AnimalsSettings.AnimalNames
+ $actualNames = $AnimalsSettings.AnimalNames
+ $actualNames | Should -BeExactly $expectedNames
+ }
+ }
+}
diff --git a/tests/3-Advanced/Cars/Cars.Container.ps1 b/tests/3-Advanced/Cars/Cars.Container.ps1
new file mode 100644
index 00000000..dce74d95
--- /dev/null
+++ b/tests/3-Advanced/Cars/Cars.Container.ps1
@@ -0,0 +1,8 @@
+@{
+ Path = Get-ChildItem -Path $PSScriptRoot -Filter *.Tests.ps1 | Select-Object -ExpandProperty FullName
+ Data = @{
+ Path = Get-ChildItem -Path $PSScriptRoot -Filter *.Data.ps1 | Select-Object -ExpandProperty FullName
+ Debug = $false
+ Verbose = $false
+ }
+}
diff --git a/tests/3-Advanced/Cars/Cars.Data.ps1 b/tests/3-Advanced/Cars/Cars.Data.ps1
new file mode 100644
index 00000000..d6394eee
--- /dev/null
+++ b/tests/3-Advanced/Cars/Cars.Data.ps1
@@ -0,0 +1,8 @@
+# Cars.Settings.ps1
+$CarsSettings = @{
+ # Expected number of car models for testing
+ CarCount = 3
+
+ # Expected list of car models for testing
+ CarModels = @('Sedan', 'SUV', 'Coupe')
+}
diff --git a/tests/3-Advanced/Cars/Cars.Tests.ps1 b/tests/3-Advanced/Cars/Cars.Tests.ps1
new file mode 100644
index 00000000..3dc253d3
--- /dev/null
+++ b/tests/3-Advanced/Cars/Cars.Tests.ps1
@@ -0,0 +1,28 @@
+[CmdletBinding()]
+param(
+ [Parameter(Mandatory)]
+ [string] $Path
+)
+
+BeforeAll {
+ . $Path
+}
+
+Describe 'Cars Module Tests' {
+
+ Context 'Car Count' {
+ It 'Should return the expected number of car models' {
+ $expectedCount = $CarsSettings.CarCount
+ $actualCount = $CarsSettings.CarModels.Count
+ $actualCount | Should -Be $expectedCount
+ }
+ }
+
+ Context 'Car Models' {
+ It 'Should return the expected list of car models' {
+ $expectedModels = $CarsSettings.CarModels
+ $actualModels = $CarsSettings.CarModels
+ $actualModels | Should -BeExactly $expectedModels
+ }
+ }
+}
diff --git a/tests/3-Advanced/Emoji/Emoji.Container.ps1 b/tests/3-Advanced/Emoji/Emoji.Container.ps1
new file mode 100644
index 00000000..dacb12f9
--- /dev/null
+++ b/tests/3-Advanced/Emoji/Emoji.Container.ps1
@@ -0,0 +1,8 @@
+@{
+ Path = Get-ChildItem -Path $PSScriptRoot -Filter *.Tests.ps1 | Select-Object -ExpandProperty FullName
+ Data = @{
+ Path = Join-Path $PSScriptRoot -ChildPath 'Emoji.psm1'
+ Debug = $false
+ Verbose = $false
+ }
+}
diff --git a/tests/3-Advanced/Emoji/Emoji.Tests.ps1 b/tests/3-Advanced/Emoji/Emoji.Tests.ps1
new file mode 100644
index 00000000..78f88ae3
--- /dev/null
+++ b/tests/3-Advanced/Emoji/Emoji.Tests.ps1
@@ -0,0 +1,61 @@
+[CmdletBinding()]
+param(
+ [Parameter(Mandatory)]
+ [string] $Path
+)
+
+Describe 'Emoji' {
+ It 'Module is importable' {
+ { Import-Module -Name $Path } | Should -Not -Throw
+ }
+}
+
+Describe 'Get-Emoji' {
+ Context 'Lookup by whole name' {
+ It 'Returns 🌵 (cactus)' {
+ Get-Emoji -Name cactus | Should -Be '🌵'
+ }
+
+ It 'Returns 🦒 (giraffe)' {
+ Get-Emoji -Name giraffe | Should -Be '🦒'
+ }
+ }
+
+ Context 'Lookup by wildcard' {
+ Context 'by prefix' {
+ BeforeAll {
+ $emojis = Get-Emoji -Name pen*
+ }
+
+ It 'Returns ✏️ (pencil)' {
+ $emojis | Should -Contain '✏️'
+ }
+
+ It 'Returns 🐧 (penguin)' {
+ $emojis | Should -Contain '🐧'
+ }
+
+ It 'Returns 😔 (pensive)' {
+ $emojis | Should -Contain '😔'
+ }
+ }
+
+ Context 'by contains' {
+ BeforeAll {
+ $emojis = Get-Emoji -Name *smiling*
+ }
+
+ It 'Returns 🙂 (slightly smiling face)' {
+ $emojis | Should -Contain '🙂'
+ }
+
+ It 'Returns 😁 (beaming face with smiling eyes)' {
+ $emojis | Should -Contain '😁'
+ }
+
+ It 'Returns 😊 (smiling face with smiling eyes)' {
+ $emojis | Should -Contain '😊'
+ }
+ }
+ }
+}
diff --git a/tests/3-Advanced/Emoji/Emoji.psm1 b/tests/3-Advanced/Emoji/Emoji.psm1
new file mode 100644
index 00000000..d27e0317
--- /dev/null
+++ b/tests/3-Advanced/Emoji/Emoji.psm1
@@ -0,0 +1,15 @@
+$script:emojis = @(
+ @{ Name = 'apple'; Symbol = '🍎'; Kind = 'Fruit' }
+ @{ Name = 'beaming face with smiling eyes'; Symbol = '😁'; Kind = 'Face' }
+ @{ Name = 'cactus'; Symbol = '🌵'; Kind = 'Plant' }
+ @{ Name = 'giraffe'; Symbol = '🦒'; Kind = 'Animal' }
+ @{ Name = 'pencil'; Symbol = '✏️'; Kind = 'Item' }
+ @{ Name = 'penguin'; Symbol = '🐧'; Kind = 'Animal' }
+ @{ Name = 'pensive'; Symbol = '😔'; Kind = 'Face' }
+ @{ Name = 'slightly smiling face'; Symbol = '🙂'; Kind = 'Face' }
+ @{ Name = 'smiling face with smiling eyes'; Symbol = '😊'; Kind = 'Face' }
+) | ForEach-Object { [PSCustomObject]$_ }
+
+function Get-Emoji ([string]$Name = '*') {
+ $script:emojis | Where-Object Name -Like $Name | ForEach-Object Symbol
+}
diff --git a/tests/3-Advanced/Pester.Configuration.ps1 b/tests/3-Advanced/Pester.Configuration.ps1
new file mode 100644
index 00000000..791150a6
--- /dev/null
+++ b/tests/3-Advanced/Pester.Configuration.ps1
@@ -0,0 +1,17 @@
+@{
+ Run = @{
+ Path = $PSScriptRoot
+ PassThru = $true
+ Container = Get-ChildItem -Path $PSScriptRoot -Filter *.Container.* -Recurse |
+ ForEach-Object { . $_ } | ForEach-Object { New-PesterContainer @_ }
+ }
+ TestResult = @{
+ Enabled = $true
+ TestSuiteName = 'Advanced'
+ }
+ Output = @{
+ CIFormat = 'Auto'
+ StackTraceVerbosity = 'Filtered'
+ Verbosity = 'Detailed'
+ }
+}
diff --git a/tests/3-Advanced/Planets/Planets.Container.ps1 b/tests/3-Advanced/Planets/Planets.Container.ps1
new file mode 100644
index 00000000..dce74d95
--- /dev/null
+++ b/tests/3-Advanced/Planets/Planets.Container.ps1
@@ -0,0 +1,8 @@
+@{
+ Path = Get-ChildItem -Path $PSScriptRoot -Filter *.Tests.ps1 | Select-Object -ExpandProperty FullName
+ Data = @{
+ Path = Get-ChildItem -Path $PSScriptRoot -Filter *.Data.ps1 | Select-Object -ExpandProperty FullName
+ Debug = $false
+ Verbose = $false
+ }
+}
diff --git a/tests/3-Advanced/Planets/Planets.Data.ps1 b/tests/3-Advanced/Planets/Planets.Data.ps1
new file mode 100644
index 00000000..31a192d8
--- /dev/null
+++ b/tests/3-Advanced/Planets/Planets.Data.ps1
@@ -0,0 +1,8 @@
+# Planets.Settings.ps1
+$PlanetsSettings = @{
+ # Expected number of planets (classical count excluding dwarf planets)
+ PlanetCount = 8
+
+ # Expected list of planet names in order from the Sun
+ PlanetNames = @('Mercury', 'Venus', 'Earth', 'Mars', 'Jupiter', 'Saturn', 'Uranus', 'Neptune')
+}
diff --git a/tests/3-Advanced/Planets/Planets.Tests.ps1 b/tests/3-Advanced/Planets/Planets.Tests.ps1
new file mode 100644
index 00000000..9c8a8d0f
--- /dev/null
+++ b/tests/3-Advanced/Planets/Planets.Tests.ps1
@@ -0,0 +1,28 @@
+[CmdletBinding()]
+param(
+ [Parameter(Mandatory)]
+ [string] $Path
+)
+
+BeforeAll {
+ . $Path
+}
+
+Describe 'Planets Module Tests' {
+
+ Context 'Planet Count' {
+ It 'Should return the expected number of planets' {
+ $expectedCount = $PlanetsSettings.PlanetCount
+ $actualCount = $PlanetsSettings.PlanetNames.Count
+ $actualCount | Should -Be $expectedCount
+ }
+ }
+
+ Context 'Planet Names' {
+ It 'Should return the expected list of planet names' {
+ $expectedNames = $PlanetsSettings.PlanetNames
+ $actualNames = $PlanetsSettings.PlanetNames
+ $actualNames | Should -BeExactly $expectedNames
+ }
+ }
+}
diff --git a/tests/README.md b/tests/README.md
deleted file mode 100644
index a570e4d1..00000000
--- a/tests/README.md
+++ /dev/null
@@ -1,3 +0,0 @@
-# Placeholder for tests
-
-Location for tests of the action.