From 28e1bd822319ade33c68489a9d37df2ddd7083ff Mon Sep 17 00:00:00 2001 From: Jonathan Colon Date: Fri, 20 Feb 2026 16:25:04 -0400 Subject: [PATCH 01/20] Enhance module manifest with additional metadata including tags, license, project URL, icon, and release notes --- AsBuiltReport.Chart/AsBuiltReport.Chart.psd1 | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/AsBuiltReport.Chart/AsBuiltReport.Chart.psd1 b/AsBuiltReport.Chart/AsBuiltReport.Chart.psd1 index ca2918c..e62bd2c 100644 --- a/AsBuiltReport.Chart/AsBuiltReport.Chart.psd1 +++ b/AsBuiltReport.Chart/AsBuiltReport.Chart.psd1 @@ -93,31 +93,26 @@ PrivateData = @{ PSData = @{ - # Tags applied to this module. These help with module discovery in online galleries. - # Tags = @() + Tags = 'AsBuiltReport', 'Chart', 'Documentation', 'ScottPlot', 'Windows', 'Linux', 'MacOS', 'PSEdition_Desktop', 'PSEdition_Core' # A URL to the license for this module. - # LicenseUri = '' + LicenseUri = 'https://raw.githubusercontent.com/AsBuiltReport/AsBuiltReport.Chart/master/LICENSE' # A URL to the main website for this project. - # ProjectUri = '' + ProjectUri = 'https://github.com/AsBuiltReport/AsBuiltReport.Chart' # A URL to an icon representing this module. - # IconUri = '' + IconUri = 'https://raw.githubusercontent.com/AsBuiltReport/.github/main/profile/images/AsBuiltReport.png' # ReleaseNotes of this module - # ReleaseNotes = '' + ReleaseNotes = 'https://raw.githubusercontent.com/AsBuiltReport/AsBuiltReport.Chart/master/CHANGELOG.md' # Prerelease string of this module # Prerelease = '' # Flag to indicate whether the module requires explicit user acceptance for install/update/save # RequireLicenseAcceptance = $false - - # External dependent modules of this module - # ExternalModuleDependencies = @() - } # End of PSData hashtable } # End of PrivateData hashtable From c22a8a376c1e3b967fa5000ee7094e100740b409 Mon Sep 17 00:00:00 2001 From: Jonathan Colon Date: Fri, 20 Feb 2026 17:13:42 -0400 Subject: [PATCH 02/20] Add validation for category names in StackedBarChart and implement tests for chart functions --- Sources/StackedBarChart.cs | 4 + Tests/AsBuiltReport.Chart.Functions.Tests.ps1 | 74 +++++++++++++++++++ 2 files changed, 78 insertions(+) create mode 100644 Tests/AsBuiltReport.Chart.Functions.Tests.ps1 diff --git a/Sources/StackedBarChart.cs b/Sources/StackedBarChart.cs index 4941d90..20e945e 100755 --- a/Sources/StackedBarChart.cs +++ b/Sources/StackedBarChart.cs @@ -10,6 +10,10 @@ internal class StackedBar : Chart static StackedBar() { } public object Chart(List values, string[] labels, string[] categoryNames, string filename = "output", int width = 400, int height = 300) { + if (values.Count != categoryNames.Length) + { + throw new Exception("Error: Values and category names must be equal."); + } if (values.Count == labels.Length) { Plot myPlot = new Plot(); diff --git a/Tests/AsBuiltReport.Chart.Functions.Tests.ps1 b/Tests/AsBuiltReport.Chart.Functions.Tests.ps1 new file mode 100644 index 0000000..760dd22 --- /dev/null +++ b/Tests/AsBuiltReport.Chart.Functions.Tests.ps1 @@ -0,0 +1,74 @@ + +# Requires -Version 5.0 + +BeforeAll { + # Import the module + $ModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\AsBuiltReport.Chart\AsBuiltReport.Chart.psd1' + Import-Module $ModulePath -Force +} + +Describe 'AsBuiltReport.Chart Exported Functions' { + It 'Should export New-PieChart' { + Get-Command -Module AsBuiltReport.Chart -Name New-PieChart | Should -Not -BeNullOrEmpty + } + It 'Should export New-BarChart' { + Get-Command -Module AsBuiltReport.Chart -Name New-BarChart | Should -Not -BeNullOrEmpty + } + It 'Should export New-StackedBarChart' { + Get-Command -Module AsBuiltReport.Chart -Name New-StackedBarChart | Should -Not -BeNullOrEmpty + } + + Context 'New-PieChart' { + It 'Should run without error with sample input' { + { New-PieChart -Title 'Test' -Values @(1,2) -Labels @('A','B') -Format 'png' -OutputFolderPath $TestDrive } | Should -Not -Throw + } + It 'Should return a file path as output' { + $result = New-PieChart -Title 'Test' -Values @(1,2) -Labels @('A','B') -Format 'png' -OutputFolderPath $TestDrive + $result | Should -BeOfType 'System.IO.FileSystemInfo' + Test-Path $result | Should -BeTrue + } + It 'Should throw error for missing mandatory parameters' { + { New-PieChart } | Should -Throw + } + It 'Should throw error for mismatched Values and Labels' { + { New-PieChart -Title 'Test' -Values @(1,2) -Labels @('A') -Format 'png' -OutputFolderPath $TestDrive } | Should -Throw -ExpectedMessage "Error: Values and labels must be equal." + } + } + + Context 'New-BarChart' { + It 'Should run without error with sample input' { + { New-BarChart -Title 'Test' -Values @(1,2) -Labels @('A','B') -Format 'png' -OutputFolderPath $TestDrive } | Should -Not -Throw + } + It 'Should return a file path as output' { + $result = New-BarChart -Title 'Test' -Values @(1,2) -Labels @('A','B') -Format 'png' -OutputFolderPath $TestDrive + $result | Should -BeOfType 'System.IO.FileSystemInfo' + Test-Path $result | Should -BeTrue + } + It 'Should throw error for missing mandatory parameters' { + { New-BarChart } | Should -Throw + } + It 'Should throw error for mismatched Values and Labels' { + { New-BarChart -Title 'Test' -Values @(1,2) -Labels @('A') -Format 'png' -OutputFolderPath $TestDrive } | Should -Throw -ExpectedMessage "Error: Values and labels must be equal." + } + } + + Context 'New-StackedBarChart' { + It 'Should run without error with sample input' { + { New-StackedBarChart -Title 'Test' -Values @(@(1,2),@(3,4)) -Labels @('A','B') -LegendCategories @('X','Y') -Format 'png' -OutputFolderPath $TestDrive } | Should -Not -Throw + } + It 'Should return a file path as output' { + $result = New-StackedBarChart -Title 'Test' -Values @(@(1,2),@(3,4)) -Labels @('A','B') -LegendCategories @('X','Y') -Format 'png' -OutputFolderPath $TestDrive + $result | Should -BeOfType 'System.IO.FileSystemInfo' + Test-Path $result | Should -BeTrue + } + It 'Should throw error for missing mandatory parameters' { + { New-StackedBarChart } | Should -Throw + } + It 'Should throw error for mismatched Values and Labels' { + { New-StackedBarChart -Title 'Test' -Values @(@(1,2),@(3,4)) -Labels @('A') -LegendCategories @('X','Y') -OutputFolderPath $TestDrive -Format 'png' } | Should -Throw -ExpectedMessage "Error: Values and labels must be equal." + } + It 'Should throw error for mismatched Values and LegendCategories' { + { New-StackedBarChart -Title 'Test' -Values @(@(1,2),@(3,4)) -Labels @('A','B') -LegendCategories @('X') -Format 'png' -OutputFolderPath $TestDrive } | Should -Throw -ExpectedMessage "Error: Values and category names must be equal." + } + } +} From 2e25904a694fd0271f60a477788c8e10c6887314 Mon Sep 17 00:00:00 2001 From: Jonathan Colon Date: Fri, 20 Feb 2026 17:20:47 -0400 Subject: [PATCH 03/20] Update Pester workflow to use actions/checkout@v6 and setup .NET 8.0, streamline build process for MacOS, Linux, and Windows --- .github/workflows/Pester.yml | 34 +++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/.github/workflows/Pester.yml b/.github/workflows/Pester.yml index 67527da..3ed87d3 100644 --- a/.github/workflows/Pester.yml +++ b/.github/workflows/Pester.yml @@ -37,7 +37,27 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@v6 + - name: Setup .NET + uses: actions/setup-dotnet@v5 + with: + dotnet-version: '8.0.x' + - name: Restore dependencies + run: dotnet restore ./Sources + - name: Build the library for MacOS + run: dotnet publish ./Sources -c Release -r osx-x64 + - name: Copy the library for MacOS + run: copy ./Sources/bin/Release/netstandard2.0/osx-x64/publish/*.* ./AsBuiltReport.Chart/Src/Assemblies/Core/osx-x64 + - name: Build the library for Linux + run: dotnet publish ./Sources -c Release -r linux-x64 + - name: Copy the library for Linux + run: copy ./Sources/bin/Release/netstandard2.0/linux-x64/publish/*.* ./AsBuiltReport.Chart/Src/Assemblies/Core/linux-x64 + - name: Build the library for Windows + run: dotnet publish ./Sources -c Release -r win-x64 + - name: Copy the library for Windows + run: copy ./Sources/bin/Release/netstandard2.0/win-x64/publish/*.* ./AsBuiltReport.Chart/Src/Assemblies/Core/windows-x64 + - name: Run tests + run: dotnet test --no-build --verbosity normal ./Sources - name: Set up PowerShell Gallery run: | @@ -47,18 +67,6 @@ jobs: run: | Install-Module -Name Pester -MinimumVersion 5.0.0 -Repository PSGallery -Force -AllowClobber -Scope CurrentUser - - name: Install PScribo - run: | - Install-Module -Name PScribo -MinimumVersion 0.11.1 -Repository PSGallery -Force -AllowClobber -Scope CurrentUser - - - name: Install PSScriptAnalyzer - run: | - Install-Module -Name PSScriptAnalyzer -MinimumVersion 1.0.0 -Repository PSGallery -Force -AllowClobber -Scope CurrentUser - - - name: Install AsBuiltReport.Core - run: | - Install-Module -Name AsBuiltReport.Core -MinimumVersion 1.6.0 -Repository PSGallery -Force -AllowClobber -Scope CurrentUser - - name: Run Pester Tests run: | $CodeCoverageParam = @{} From 2b15a7c75aef14e74e80b6c4b6b6ae9d04f462d3 Mon Sep 17 00:00:00 2001 From: Jonathan Colon Date: Fri, 20 Feb 2026 17:24:26 -0400 Subject: [PATCH 04/20] Enhance Pester workflow to include conditional checks for OS-specific build and copy steps --- .github/workflows/Pester.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/Pester.yml b/.github/workflows/Pester.yml index 3ed87d3..9caacf4 100644 --- a/.github/workflows/Pester.yml +++ b/.github/workflows/Pester.yml @@ -46,16 +46,22 @@ jobs: run: dotnet restore ./Sources - name: Build the library for MacOS run: dotnet publish ./Sources -c Release -r osx-x64 + if: matrix.os == 'macos-latest' - name: Copy the library for MacOS run: copy ./Sources/bin/Release/netstandard2.0/osx-x64/publish/*.* ./AsBuiltReport.Chart/Src/Assemblies/Core/osx-x64 + if: matrix.os == 'macos-latest' - name: Build the library for Linux run: dotnet publish ./Sources -c Release -r linux-x64 + if: matrix.os == 'ubuntu-latest' - name: Copy the library for Linux run: copy ./Sources/bin/Release/netstandard2.0/linux-x64/publish/*.* ./AsBuiltReport.Chart/Src/Assemblies/Core/linux-x64 + if: matrix.os == 'ubuntu-latest' - name: Build the library for Windows run: dotnet publish ./Sources -c Release -r win-x64 + if: matrix.os == 'windows-latest' - name: Copy the library for Windows run: copy ./Sources/bin/Release/netstandard2.0/win-x64/publish/*.* ./AsBuiltReport.Chart/Src/Assemblies/Core/windows-x64 + if: matrix.os == 'windows-latest' - name: Run tests run: dotnet test --no-build --verbosity normal ./Sources From eafc46201987d50b1ab30910af95de4a2f0c5cdb Mon Sep 17 00:00:00 2001 From: Jonathan Colon Date: Fri, 20 Feb 2026 17:30:08 -0400 Subject: [PATCH 05/20] Add Windows PowerShell build and copy steps to Pester workflow --- .github/workflows/Pester.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/Pester.yml b/.github/workflows/Pester.yml index 9caacf4..6a14aee 100644 --- a/.github/workflows/Pester.yml +++ b/.github/workflows/Pester.yml @@ -62,6 +62,12 @@ jobs: - name: Copy the library for Windows run: copy ./Sources/bin/Release/netstandard2.0/win-x64/publish/*.* ./AsBuiltReport.Chart/Src/Assemblies/Core/windows-x64 if: matrix.os == 'windows-latest' + - name: Build the library for Windows PowerShell + run: dotnet publish ./Sources -c Release -r win-x64 + if: matrix.os == 'windows-latest' && matrix.shell == 'powershell' + - name: Copy the library for Windows PowerShell + run: copy ./Sources/bin/Release/netstandard2.0/win-x64/publish/*.* ./AsBuiltReport.Chart/Src/Assemblies/Desktop/windows-x64 + if: matrix.os == 'windows-latest' && matrix.shell == 'powershell' - name: Run tests run: dotnet test --no-build --verbosity normal ./Sources From d875d9f85261f207b9d925beb2ccd6b1a5ffce86 Mon Sep 17 00:00:00 2001 From: Jonathan Colon Date: Fri, 20 Feb 2026 19:51:33 -0400 Subject: [PATCH 06/20] Enhance Pester and Release workflows for MacOS ARM64 support and update architecture handling in PowerShell module --- .github/workflows/Pester.yml | 8 ++++---- .github/workflows/Release.yml | 14 +++++++++++--- AsBuiltReport.Chart/AsBuiltReport.Chart.psm1 | 14 +++++++++++++- .../Src/Assemblies/Core/{osx-x64 => mac-osx}/dummy | 0 4 files changed, 28 insertions(+), 8 deletions(-) rename AsBuiltReport.Chart/Src/Assemblies/Core/{osx-x64 => mac-osx}/dummy (100%) diff --git a/.github/workflows/Pester.yml b/.github/workflows/Pester.yml index 6a14aee..9f2c10b 100644 --- a/.github/workflows/Pester.yml +++ b/.github/workflows/Pester.yml @@ -45,10 +45,10 @@ jobs: - name: Restore dependencies run: dotnet restore ./Sources - name: Build the library for MacOS - run: dotnet publish ./Sources -c Release -r osx-x64 + run: dotnet publish ./Sources -c Release -r osx-arm64 if: matrix.os == 'macos-latest' - name: Copy the library for MacOS - run: copy ./Sources/bin/Release/netstandard2.0/osx-x64/publish/*.* ./AsBuiltReport.Chart/Src/Assemblies/Core/osx-x64 + run: copy ./Sources/bin/Release/netstandard2.0/osx-arm64/publish/*.* ./AsBuiltReport.Chart/Src/Assemblies/Core/mac-osx/arm if: matrix.os == 'macos-latest' - name: Build the library for Linux run: dotnet publish ./Sources -c Release -r linux-x64 @@ -58,10 +58,10 @@ jobs: if: matrix.os == 'ubuntu-latest' - name: Build the library for Windows run: dotnet publish ./Sources -c Release -r win-x64 - if: matrix.os == 'windows-latest' + if: matrix.os == 'windows-latest' && matrix.shell == 'pwsh' - name: Copy the library for Windows run: copy ./Sources/bin/Release/netstandard2.0/win-x64/publish/*.* ./AsBuiltReport.Chart/Src/Assemblies/Core/windows-x64 - if: matrix.os == 'windows-latest' + if: matrix.os == 'windows-latest' && matrix.shell == 'pwsh' - name: Build the library for Windows PowerShell run: dotnet publish ./Sources -c Release -r win-x64 if: matrix.os == 'windows-latest' && matrix.shell == 'powershell' diff --git a/.github/workflows/Release.yml b/.github/workflows/Release.yml index 91b82b3..0c97aad 100644 --- a/.github/workflows/Release.yml +++ b/.github/workflows/Release.yml @@ -15,10 +15,14 @@ jobs: dotnet-version: '8.0.x' - name: Restore dependencies run: dotnet restore ./Sources - - name: Build the library for MacOS + - name: Build the library for MacOS X64 run: dotnet publish ./Sources -c Release -r osx-x64 - - name: Copy the library for MacOS - run: copy ./Sources/bin/Release/netstandard2.0/osx-x64/publish/*.* ./AsBuiltReport.Chart/Src/Assemblies/Core/osx-x64 + - name: Copy the library for MacOS X64 + run: copy ./Sources/bin/Release/netstandard2.0/osx-x64/publish/*.* ./AsBuiltReport.Chart/Src/Assemblies/Core/mac-osx/x64 + - name: Build the library for MacOS Arm64 + run: dotnet publish ./Sources -c Release -r osx-arm64 + - name: Copy the library for MacOS Arm64 + run: copy ./Sources/bin/Release/netstandard2.0/osx-arm64/publish/*.* ./AsBuiltReport.Chart/Src/Assemblies/Core/mac-osx/arm - name: Build the library for Linux run: dotnet publish ./Sources -c Release -r linux-x64 - name: Copy the library for Linux @@ -27,6 +31,10 @@ jobs: run: dotnet publish ./Sources -c Release -r win-x64 - name: Copy the library for Windows run: copy ./Sources/bin/Release/netstandard2.0/win-x64/publish/*.* ./AsBuiltReport.Chart/Src/Assemblies/Core/windows-x64 + - name: Build the library for Windows PowerShell + run: dotnet publish ./Sources -c Release -r win-x64 + - name: Copy the library for Windows PowerShell + run: copy ./Sources/bin/Release/netstandard2.0/win-x64/publish/*.* ./AsBuiltReport.Chart/Src/Assemblies/Desktop/windows-x64 - name: Run tests run: dotnet test --no-build --verbosity normal ./Sources - name: Set PSRepository to Trusted for PowerShell Gallery diff --git a/AsBuiltReport.Chart/AsBuiltReport.Chart.psm1 b/AsBuiltReport.Chart/AsBuiltReport.Chart.psm1 index 42a9d1e..8d2cc2c 100644 --- a/AsBuiltReport.Chart/AsBuiltReport.Chart.psm1 +++ b/AsBuiltReport.Chart/AsBuiltReport.Chart.psm1 @@ -2,7 +2,19 @@ switch ($PSVersionTable.PSEdition) { 'Core' { if ($IsMacOS) { - Import-Module ("$PSScriptRoot{0}Src{0}Assemblies{0}Core{0}osx-x64{0}AsBuiltReportChart.dll" -f [System.IO.Path]::DirectorySeparatorChar) + $architecture = [System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture + if ($architecture -eq "Arm64" -or $architecture -eq "Arm") { + Write-Verbose "Architecture: ARM (Apple Silicon)" + Import-Module ("$PSScriptRoot{0}Src{0}Assemblies{0}Core{0}mac-osx{0}arm{0}AsBuiltReportChart.dll" -f [System.IO.Path]::DirectorySeparatorChar) + + } elseif ($architecture -eq "X64" -or $architecture -eq "X86") { + Write-Verbose "Architecture: x86 (Intel)" + Import-Module ("$PSScriptRoot{0}Src{0}Assemblies{0}Core{0}mac-osx{0}x64{0}AsBuiltReportChart.dll" -f [System.IO.Path]::DirectorySeparatorChar) + + } else { + Write-Verbose "Architecture: Unknown or other architecture" + Import-Module ("$PSScriptRoot{0}Src{0}Assemblies{0}Core{0}mac-osx{0}arm{0}AsBuiltReportChart.dll" -f [System.IO.Path]::DirectorySeparatorChar) + } } elseif ($IsLinux) { Import-Module ("$PSScriptRoot{0}Src{0}Assemblies{0}Core{0}linux-x64{0}AsBuiltReportChart.dll" -f [System.IO.Path]::DirectorySeparatorChar) } elseif ($IsWindows) { diff --git a/AsBuiltReport.Chart/Src/Assemblies/Core/osx-x64/dummy b/AsBuiltReport.Chart/Src/Assemblies/Core/mac-osx/dummy similarity index 100% rename from AsBuiltReport.Chart/Src/Assemblies/Core/osx-x64/dummy rename to AsBuiltReport.Chart/Src/Assemblies/Core/mac-osx/dummy From 6f6635ce512da2e0e86911eb5bc784b3f0c59b48 Mon Sep 17 00:00:00 2001 From: Jonathan Colon Date: Fri, 20 Feb 2026 20:12:51 -0400 Subject: [PATCH 07/20] Remove unnecessary module dependencies from Invoke-Tests script and clean up Pester workflow --- .github/workflows/Pester.yml | 12 +----------- Tests/Invoke-Tests.ps1 | 2 -- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/.github/workflows/Pester.yml b/.github/workflows/Pester.yml index 9f2c10b..41aa075 100644 --- a/.github/workflows/Pester.yml +++ b/.github/workflows/Pester.yml @@ -97,14 +97,4 @@ jobs: with: name: test-results-${{ matrix.os }}-${{ matrix.shell }} path: Tests/testResults.xml - retention-days: 30 - - - name: Upload code coverage to Codecov - if: matrix.os == 'windows-latest' && matrix.shell == 'pwsh' - uses: codecov/codecov-action@v5 - with: - files: ./Tests/coverage.xml - flags: unit - name: codecov-${{ matrix.os }}-${{ matrix.shell }} - token: ${{ secrets.CODECOV_TOKEN }} - fail_ci_if_error: false \ No newline at end of file + retention-days: 30 \ No newline at end of file diff --git a/Tests/Invoke-Tests.ps1 b/Tests/Invoke-Tests.ps1 index f43e37f..579f983 100644 --- a/Tests/Invoke-Tests.ps1 +++ b/Tests/Invoke-Tests.ps1 @@ -58,8 +58,6 @@ Write-Host "`nInstalling required modules..." -ForegroundColor Yellow $RequiredModules = @( @{ Name = 'Pester'; MinimumVersion = '5.0.0' } - @{ Name = 'PScribo'; MinimumVersion = '0.11.1' } - @{ Name = 'PSScriptAnalyzer'; MinimumVersion = '1.0.0' } ) foreach ($Module in $RequiredModules) { From 936fdba468adeca5b7d416e2ad9f36e5aca0823c Mon Sep 17 00:00:00 2001 From: Jonathan Colon Date: Fri, 20 Feb 2026 20:15:54 -0400 Subject: [PATCH 08/20] Remove conditional code coverage for Windows PowerShell in Pester workflow --- .github/workflows/Pester.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/Pester.yml b/.github/workflows/Pester.yml index 41aa075..35018b4 100644 --- a/.github/workflows/Pester.yml +++ b/.github/workflows/Pester.yml @@ -84,11 +84,6 @@ jobs: $CodeCoverageParam = @{} $OutputFormatParam = @{ OutputFormat = 'NUnitXml' } - # Only enable code coverage for Windows + pwsh - if ('${{ matrix.os }}' -eq 'windows-latest' -and '${{ matrix.shell }}' -eq 'pwsh') { - $CodeCoverageParam = @{ CodeCoverage = $true } - } - .\Tests\Invoke-Tests.ps1 @CodeCoverageParam @OutputFormatParam - name: Upload test results From 70af96408db1cfd6f5b5e557f0478ab195c59b19 Mon Sep 17 00:00:00 2001 From: Jonathan Colon Date: Fri, 20 Feb 2026 20:19:45 -0400 Subject: [PATCH 09/20] Enhance module import statements for macOS ARM and x86 architectures with verbose and debug output --- AsBuiltReport.Chart/AsBuiltReport.Chart.psm1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/AsBuiltReport.Chart/AsBuiltReport.Chart.psm1 b/AsBuiltReport.Chart/AsBuiltReport.Chart.psm1 index 8d2cc2c..c34a17b 100644 --- a/AsBuiltReport.Chart/AsBuiltReport.Chart.psm1 +++ b/AsBuiltReport.Chart/AsBuiltReport.Chart.psm1 @@ -5,15 +5,15 @@ switch ($PSVersionTable.PSEdition) { $architecture = [System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture if ($architecture -eq "Arm64" -or $architecture -eq "Arm") { Write-Verbose "Architecture: ARM (Apple Silicon)" - Import-Module ("$PSScriptRoot{0}Src{0}Assemblies{0}Core{0}mac-osx{0}arm{0}AsBuiltReportChart.dll" -f [System.IO.Path]::DirectorySeparatorChar) + Import-Module ("$PSScriptRoot{0}Src{0}Assemblies{0}Core{0}mac-osx{0}arm{0}AsBuiltReportChart.dll" -f [System.IO.Path]::DirectorySeparatorChar) -Verbose -Debug } elseif ($architecture -eq "X64" -or $architecture -eq "X86") { Write-Verbose "Architecture: x86 (Intel)" - Import-Module ("$PSScriptRoot{0}Src{0}Assemblies{0}Core{0}mac-osx{0}x64{0}AsBuiltReportChart.dll" -f [System.IO.Path]::DirectorySeparatorChar) + Import-Module ("$PSScriptRoot{0}Src{0}Assemblies{0}Core{0}mac-osx{0}x64{0}AsBuiltReportChart.dll" -f [System.IO.Path]::DirectorySeparatorChar) -Verbose -Debug } else { Write-Verbose "Architecture: Unknown or other architecture" - Import-Module ("$PSScriptRoot{0}Src{0}Assemblies{0}Core{0}mac-osx{0}arm{0}AsBuiltReportChart.dll" -f [System.IO.Path]::DirectorySeparatorChar) + Import-Module ("$PSScriptRoot{0}Src{0}Assemblies{0}Core{0}mac-osx{0}arm{0}AsBuiltReportChart.dll" -f [System.IO.Path]::DirectorySeparatorChar) -Verbose -Debug } } elseif ($IsLinux) { Import-Module ("$PSScriptRoot{0}Src{0}Assemblies{0}Core{0}linux-x64{0}AsBuiltReportChart.dll" -f [System.IO.Path]::DirectorySeparatorChar) From c98b6e09dc0a58fe50919d9d5ef9674a92c4d4c1 Mon Sep 17 00:00:00 2001 From: Jonathan Colon Date: Fri, 20 Feb 2026 22:20:17 -0400 Subject: [PATCH 10/20] Refactor workflows and issue templates for consistency and clarity; enhance Pester test output with verbose and debug options --- .github/Dependabot.yml | 2 +- .github/ISSUE_TEMPLATE/bug_report.yml | 1 - .github/ISSUE_TEMPLATE/change_request.yml | 1 - .github/ISSUE_TEMPLATE/config.yml | 2 +- .github/workflows/Codeql.yml | 76 ++++---- .github/workflows/PSScriptAnalyzer.yml | 28 +-- .github/workflows/Pester.yml | 170 +++++++++--------- .github/workflows/Release.yml | 144 +++++++-------- .github/workflows/Stale.yml | 31 ++-- Tests/AsBuiltReport.Chart.Functions.Tests.ps1 | 20 +-- Tests/Invoke-Tests.ps1 | 2 +- 11 files changed, 239 insertions(+), 238 deletions(-) diff --git a/.github/Dependabot.yml b/.github/Dependabot.yml index 0dd3319..4a7c04f 100644 --- a/.github/Dependabot.yml +++ b/.github/Dependabot.yml @@ -14,4 +14,4 @@ updates: - "rebelinux" labels: - "dependencies" - - "automated" \ No newline at end of file + - "automated" diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index ce70ef9..1015b96 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -95,4 +95,3 @@ body: - label: >- I have checked for previously opened & closed [issues](https://github.com/AsBuiltReport/AsBuiltReport.Chart/issues) before submitting this bug report. required: true - diff --git a/.github/ISSUE_TEMPLATE/change_request.yml b/.github/ISSUE_TEMPLATE/change_request.yml index 0ad1858..8a2cee0 100644 --- a/.github/ISSUE_TEMPLATE/change_request.yml +++ b/.github/ISSUE_TEMPLATE/change_request.yml @@ -31,4 +31,3 @@ body: - label: >- I have checked for previously opened & closed [issues](https://github.com/AsBuiltReport/AsBuiltReport.Chart/issues) before submitting this change request. required: true - diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index ec4bb38..3ba13e0 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1 +1 @@ -blank_issues_enabled: false \ No newline at end of file +blank_issues_enabled: false diff --git a/.github/workflows/Codeql.yml b/.github/workflows/Codeql.yml index dbe878b..a46295b 100644 --- a/.github/workflows/Codeql.yml +++ b/.github/workflows/Codeql.yml @@ -1,47 +1,47 @@ name: "CodeQL Analysis" on: - push: - branches: [ dev ] - pull_request: - branches: [ dev ] - schedule: - - cron: '0 2 * * *' + push: + branches: [dev] + pull_request: + branches: [dev] + schedule: + - cron: "0 2 * * *" jobs: - analyze: - name: Analyze - runs-on: ubuntu-latest - permissions: - actions: read - contents: read - security-events: write - strategy: - fail-fast: false - matrix: - language: [ 'csharp' ] + analyze: + name: Analyze + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + strategy: + fail-fast: false + matrix: + language: ["csharp"] - steps: - - name: Checkout repository - uses: actions/checkout@v6 + steps: + - name: Checkout repository + uses: actions/checkout@v6 - # Initializes the CodeQL tools and creates a CodeQL database - - name: Initialize CodeQL - uses: github/codeql-action/init@v4 - with: - build-mode: none - languages: ${{ matrix.language }} - # If you have custom queries, you can add them here using a queries property + # Initializes the CodeQL tools and creates a CodeQL database + - name: Initialize CodeQL + uses: github/codeql-action/init@v4 + with: + build-mode: none + languages: ${{ matrix.language }} + # If you have custom queries, you can add them here using a queries property - # Autobuild attempts to build the C# project automatically. - # For complex C# projects, you may need to replace this with custom build commands (e.g., using `dotnet build`) - - name: Autobuild - uses: github/codeql-action/autobuild@v4 - with: - working-directory: ./Sources + # Autobuild attempts to build the C# project automatically. + # For complex C# projects, you may need to replace this with custom build commands (e.g., using `dotnet build`) + - name: Autobuild + uses: github/codeql-action/autobuild@v4 + with: + working-directory: ./Sources - # Performs the CodeQL analysis and uploads the results to GitHub - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v4 - with: - category: "/language:${{ matrix.language }}" + # Performs the CodeQL analysis and uploads the results to GitHub + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v4 + with: + category: "/language:${{ matrix.language }}" diff --git a/.github/workflows/PSScriptAnalyzer.yml b/.github/workflows/PSScriptAnalyzer.yml index 210b4c4..759bcad 100644 --- a/.github/workflows/PSScriptAnalyzer.yml +++ b/.github/workflows/PSScriptAnalyzer.yml @@ -1,17 +1,17 @@ name: PSScriptAnalyzer on: [push, pull_request] jobs: - lint: - name: Run PSScriptAnalyzer - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v6 - - name: lint - uses: devblackops/github-action-psscriptanalyzer@master - with: - sendComment: true - failOnErrors: true - failOnWarnings: false - failOnInfos: false - repoToken: ${{ secrets.GITHUB_TOKEN }} - settingsPath: .github/workflows/PSScriptAnalyzerSettings.psd1 \ No newline at end of file + lint: + name: Run PSScriptAnalyzer + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + - name: lint + uses: devblackops/github-action-psscriptanalyzer@master + with: + sendComment: true + failOnErrors: true + failOnWarnings: false + failOnInfos: false + repoToken: ${{ secrets.GITHUB_TOKEN }} + settingsPath: .github/workflows/PSScriptAnalyzerSettings.psd1 diff --git a/.github/workflows/Pester.yml b/.github/workflows/Pester.yml index 35018b4..9a816cf 100644 --- a/.github/workflows/Pester.yml +++ b/.github/workflows/Pester.yml @@ -1,95 +1,99 @@ name: Pester Tests on: - push: - branches: - - main - - dev - - master - pull_request: - branches: - - main - - dev - - master - workflow_dispatch: + push: + branches: + - main + - dev + - master + pull_request: + branches: + - main + - dev + - master + workflow_dispatch: jobs: - test: - name: Pester Tests - ${{ matrix.os }} - ${{ matrix.shell }} - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [windows-latest, ubuntu-latest, macos-latest] - shell: [pwsh] - include: - - os: windows-latest - shell: powershell - exclude: - - os: ubuntu-latest - shell: powershell - - os: macos-latest - shell: powershell + test: + name: Pester Tests - ${{ matrix.os }} - ${{ matrix.shell }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [windows-latest, ubuntu-latest, macos-latest] + shell: [pwsh] + include: + - os: windows-latest + shell: powershell + exclude: + - os: ubuntu-latest + shell: powershell + - os: macos-latest + shell: powershell - defaults: - run: - shell: ${{ matrix.shell }} + defaults: + run: + shell: ${{ matrix.shell }} - steps: - - name: Checkout repository - uses: actions/checkout@v6 - - name: Setup .NET - uses: actions/setup-dotnet@v5 - with: - dotnet-version: '8.0.x' - - name: Restore dependencies - run: dotnet restore ./Sources - - name: Build the library for MacOS - run: dotnet publish ./Sources -c Release -r osx-arm64 - if: matrix.os == 'macos-latest' - - name: Copy the library for MacOS - run: copy ./Sources/bin/Release/netstandard2.0/osx-arm64/publish/*.* ./AsBuiltReport.Chart/Src/Assemblies/Core/mac-osx/arm - if: matrix.os == 'macos-latest' - - name: Build the library for Linux - run: dotnet publish ./Sources -c Release -r linux-x64 - if: matrix.os == 'ubuntu-latest' - - name: Copy the library for Linux - run: copy ./Sources/bin/Release/netstandard2.0/linux-x64/publish/*.* ./AsBuiltReport.Chart/Src/Assemblies/Core/linux-x64 - if: matrix.os == 'ubuntu-latest' - - name: Build the library for Windows - run: dotnet publish ./Sources -c Release -r win-x64 - if: matrix.os == 'windows-latest' && matrix.shell == 'pwsh' - - name: Copy the library for Windows - run: copy ./Sources/bin/Release/netstandard2.0/win-x64/publish/*.* ./AsBuiltReport.Chart/Src/Assemblies/Core/windows-x64 - if: matrix.os == 'windows-latest' && matrix.shell == 'pwsh' - - name: Build the library for Windows PowerShell - run: dotnet publish ./Sources -c Release -r win-x64 - if: matrix.os == 'windows-latest' && matrix.shell == 'powershell' - - name: Copy the library for Windows PowerShell - run: copy ./Sources/bin/Release/netstandard2.0/win-x64/publish/*.* ./AsBuiltReport.Chart/Src/Assemblies/Desktop/windows-x64 - if: matrix.os == 'windows-latest' && matrix.shell == 'powershell' - - name: Run tests - run: dotnet test --no-build --verbosity normal ./Sources + steps: + - name: Checkout repository + uses: actions/checkout@v6 + - name: Setup .NET + uses: actions/setup-dotnet@v5 + with: + dotnet-version: "8.0.x" + - name: Restore dependencies + run: dotnet restore ./Sources + - name: Build the library for MacOS + run: dotnet publish ./Sources -c Release -r osx-arm64 + if: matrix.os == 'macos-latest' + - name: Copy the library for MacOS + run: copy ./Sources/bin/Release/netstandard2.0/osx-arm64/publish/*.* ./AsBuiltReport.Chart/Src/Assemblies/Core/mac-osx/arm + if: matrix.os == 'macos-latest' + - name: Build the library for Linux + run: dotnet publish ./Sources -c Release -r linux-x64 + if: matrix.os == 'ubuntu-latest' + - name: Copy the library for Linux + run: copy ./Sources/bin/Release/netstandard2.0/linux-x64/publish/*.* ./AsBuiltReport.Chart/Src/Assemblies/Core/linux-x64 + if: matrix.os == 'ubuntu-latest' + - name: Build the library for Windows + run: dotnet publish ./Sources -c Release -r win-x64 + if: matrix.os == 'windows-latest' && matrix.shell == 'pwsh' + - name: Copy the library for Windows + run: copy ./Sources/bin/Release/netstandard2.0/win-x64/publish/*.* ./AsBuiltReport.Chart/Src/Assemblies/Core/windows-x64 + if: matrix.os == 'windows-latest' && matrix.shell == 'pwsh' + - name: Build the library for Windows PowerShell + run: dotnet publish ./Sources -c Release -r win-x64 + if: matrix.os == 'windows-latest' && matrix.shell == 'powershell' + - name: Copy the library for Windows PowerShell + run: copy ./Sources/bin/Release/netstandard2.0/win-x64/publish/*.* ./AsBuiltReport.Chart/Src/Assemblies/Desktop/windows-x64 + if: matrix.os == 'windows-latest' && matrix.shell == 'powershell' + - name: Run tests + run: dotnet test --no-build --verbosity normal ./Sources - - name: Set up PowerShell Gallery - run: | - Set-PSRepository -Name PSGallery -InstallationPolicy Trusted + - name: Set up PowerShell Gallery + run: | + Set-PSRepository -Name PSGallery -InstallationPolicy Trusted - - name: Install Pester - run: | - Install-Module -Name Pester -MinimumVersion 5.0.0 -Repository PSGallery -Force -AllowClobber -Scope CurrentUser + - name: Install Pester + run: | + Install-Module -Name Pester -MinimumVersion 5.0.0 -Repository PSGallery -Force -AllowClobber -Scope CurrentUser - - name: Run Pester Tests - run: | - $CodeCoverageParam = @{} - $OutputFormatParam = @{ OutputFormat = 'NUnitXml' } + - name: List Dll files in the test directory + run: Get-ChildItem -Path .\AsBuiltReport.Chart\Src\Assemblies\Core\ -Recurse + if: matrix.os == 'macos-latest' - .\Tests\Invoke-Tests.ps1 @CodeCoverageParam @OutputFormatParam + - name: Run Pester Tests + run: | + $CodeCoverageParam = @{} + $OutputFormatParam = @{ OutputFormat = 'NUnitXml' } - - name: Upload test results - if: always() - uses: actions/upload-artifact@v4 - with: - name: test-results-${{ matrix.os }}-${{ matrix.shell }} - path: Tests/testResults.xml - retention-days: 30 \ No newline at end of file + .\Tests\Invoke-Tests.ps1 @CodeCoverageParam @OutputFormatParam + + - name: Upload test results + if: always() + uses: actions/upload-artifact@v4 + with: + name: test-results-${{ matrix.os }}-${{ matrix.shell }} + path: Tests/testResults.xml + retention-days: 30 diff --git a/.github/workflows/Release.yml b/.github/workflows/Release.yml index 0c97aad..5d134e2 100644 --- a/.github/workflows/Release.yml +++ b/.github/workflows/Release.yml @@ -1,77 +1,77 @@ name: Publish PowerShell Module on: - release: - types: [published] + release: + types: [published] jobs: - publish-to-psgallery: - runs-on: windows-latest - steps: - - uses: actions/checkout@v6 - - name: Setup .NET - uses: actions/setup-dotnet@v5 - with: - dotnet-version: '8.0.x' - - name: Restore dependencies - run: dotnet restore ./Sources - - name: Build the library for MacOS X64 - run: dotnet publish ./Sources -c Release -r osx-x64 - - name: Copy the library for MacOS X64 - run: copy ./Sources/bin/Release/netstandard2.0/osx-x64/publish/*.* ./AsBuiltReport.Chart/Src/Assemblies/Core/mac-osx/x64 - - name: Build the library for MacOS Arm64 - run: dotnet publish ./Sources -c Release -r osx-arm64 - - name: Copy the library for MacOS Arm64 - run: copy ./Sources/bin/Release/netstandard2.0/osx-arm64/publish/*.* ./AsBuiltReport.Chart/Src/Assemblies/Core/mac-osx/arm - - name: Build the library for Linux - run: dotnet publish ./Sources -c Release -r linux-x64 - - name: Copy the library for Linux - run: copy ./Sources/bin/Release/netstandard2.0/linux-x64/publish/*.* ./AsBuiltReport.Chart/Src/Assemblies/Core/linux-x64 - - name: Build the library for Windows - run: dotnet publish ./Sources -c Release -r win-x64 - - name: Copy the library for Windows - run: copy ./Sources/bin/Release/netstandard2.0/win-x64/publish/*.* ./AsBuiltReport.Chart/Src/Assemblies/Core/windows-x64 - - name: Build the library for Windows PowerShell - run: dotnet publish ./Sources -c Release -r win-x64 - - name: Copy the library for Windows PowerShell - run: copy ./Sources/bin/Release/netstandard2.0/win-x64/publish/*.* ./AsBuiltReport.Chart/Src/Assemblies/Desktop/windows-x64 - - name: Run tests - run: dotnet test --no-build --verbosity normal ./Sources - - name: Set PSRepository to Trusted for PowerShell Gallery - shell: pwsh - run: | - Set-PSRepository -Name PSGallery -InstallationPolicy Trusted - - name: Test Module Manifest - shell: pwsh - run: | - Test-ModuleManifest .\AsBuiltReport.Chart\AsBuiltReport.Chart.psd1 - - name: Publish module to PowerShell Gallery - shell: pwsh - run: | - Publish-Module -Path .\AsBuiltReport.Chart\ -NuGetApiKey ${{ secrets.PSGALLERY_API_KEY }} -Verbose - tweet: - needs: publish-to-psgallery - runs-on: ubuntu-latest - steps: - - uses: Eomm/why-don-t-you-tweet@v2 - # We don't want to tweet if the repository is not a public one - if: ${{ !github.event.repository.private }} - with: - # GitHub event payload - # https://docs.github.com/en/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#release - tweet-message: "[New Release] ${{ github.event.repository.name }} ${{ github.event.release.tag_name }}! Check out what's new! ${{ github.event.release.html_url }} #AsBuiltReport #PowerShell" - env: - TWITTER_CONSUMER_API_KEY: ${{ secrets.TWITTER_CONSUMER_API_KEY }} - TWITTER_CONSUMER_API_SECRET: ${{ secrets.TWITTER_CONSUMER_API_SECRET }} - TWITTER_ACCESS_TOKEN: ${{ secrets.TWITTER_ACCESS_TOKEN }} - TWITTER_ACCESS_TOKEN_SECRET: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }} - bsky-post: - needs: publish-to-psgallery - runs-on: ubuntu-latest - steps: - - uses: zentered/bluesky-post-action@v0.3.0 - with: - post: "[New Release] ${{ github.event.repository.name }} ${{ github.event.release.tag_name }}! Check out what's new! ${{ github.event.release.html_url }} #AsBuiltReport #PowerShell" - env: - BSKY_IDENTIFIER: ${{ secrets.BSKY_IDENTIFIER }} - BSKY_PASSWORD: ${{ secrets.BSKY_PASSWORD }} + publish-to-psgallery: + runs-on: windows-latest + steps: + - uses: actions/checkout@v6 + - name: Setup .NET + uses: actions/setup-dotnet@v5 + with: + dotnet-version: "8.0.x" + - name: Restore dependencies + run: dotnet restore ./Sources + - name: Build the library for MacOS X64 + run: dotnet publish ./Sources -c Release -r osx-x64 + - name: Copy the library for MacOS X64 + run: copy ./Sources/bin/Release/netstandard2.0/osx-x64/publish/*.* ./AsBuiltReport.Chart/Src/Assemblies/Core/mac-osx/x64 + - name: Build the library for MacOS Arm64 + run: dotnet publish ./Sources -c Release -r osx-arm64 + - name: Copy the library for MacOS Arm64 + run: copy ./Sources/bin/Release/netstandard2.0/osx-arm64/publish/*.* ./AsBuiltReport.Chart/Src/Assemblies/Core/mac-osx/arm + - name: Build the library for Linux + run: dotnet publish ./Sources -c Release -r linux-x64 + - name: Copy the library for Linux + run: copy ./Sources/bin/Release/netstandard2.0/linux-x64/publish/*.* ./AsBuiltReport.Chart/Src/Assemblies/Core/linux-x64 + - name: Build the library for Windows + run: dotnet publish ./Sources -c Release -r win-x64 + - name: Copy the library for Windows + run: copy ./Sources/bin/Release/netstandard2.0/win-x64/publish/*.* ./AsBuiltReport.Chart/Src/Assemblies/Core/windows-x64 + - name: Build the library for Windows PowerShell + run: dotnet publish ./Sources -c Release -r win-x64 + - name: Copy the library for Windows PowerShell + run: copy ./Sources/bin/Release/netstandard2.0/win-x64/publish/*.* ./AsBuiltReport.Chart/Src/Assemblies/Desktop/windows-x64 + - name: Run tests + run: dotnet test --no-build --verbosity normal ./Sources + - name: Set PSRepository to Trusted for PowerShell Gallery + shell: pwsh + run: | + Set-PSRepository -Name PSGallery -InstallationPolicy Trusted + - name: Test Module Manifest + shell: pwsh + run: | + Test-ModuleManifest .\AsBuiltReport.Chart\AsBuiltReport.Chart.psd1 + - name: Publish module to PowerShell Gallery + shell: pwsh + run: | + Publish-Module -Path .\AsBuiltReport.Chart\ -NuGetApiKey ${{ secrets.PSGALLERY_API_KEY }} -Verbose + tweet: + needs: publish-to-psgallery + runs-on: ubuntu-latest + steps: + - uses: Eomm/why-don-t-you-tweet@v2 + # We don't want to tweet if the repository is not a public one + if: ${{ !github.event.repository.private }} + with: + # GitHub event payload + # https://docs.github.com/en/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#release + tweet-message: "[New Release] ${{ github.event.repository.name }} ${{ github.event.release.tag_name }}! Check out what's new! ${{ github.event.release.html_url }} #AsBuiltReport #PowerShell" + env: + TWITTER_CONSUMER_API_KEY: ${{ secrets.TWITTER_CONSUMER_API_KEY }} + TWITTER_CONSUMER_API_SECRET: ${{ secrets.TWITTER_CONSUMER_API_SECRET }} + TWITTER_ACCESS_TOKEN: ${{ secrets.TWITTER_ACCESS_TOKEN }} + TWITTER_ACCESS_TOKEN_SECRET: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }} + bsky-post: + needs: publish-to-psgallery + runs-on: ubuntu-latest + steps: + - uses: zentered/bluesky-post-action@v0.3.0 + with: + post: "[New Release] ${{ github.event.repository.name }} ${{ github.event.release.tag_name }}! Check out what's new! ${{ github.event.release.html_url }} #AsBuiltReport #PowerShell" + env: + BSKY_IDENTIFIER: ${{ secrets.BSKY_IDENTIFIER }} + BSKY_PASSWORD: ${{ secrets.BSKY_PASSWORD }} diff --git a/.github/workflows/Stale.yml b/.github/workflows/Stale.yml index 108bcdf..be3ca59 100644 --- a/.github/workflows/Stale.yml +++ b/.github/workflows/Stale.yml @@ -1,19 +1,18 @@ -name: 'Close stale issues and PRs' +name: "Close stale issues and PRs" on: - schedule: - - cron: '30 1 * * *' + schedule: + - cron: "30 1 * * *" jobs: - stale: - runs-on: ubuntu-latest - steps: - - uses: actions/stale@v9 - with: - stale-issue-message: 'This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.' - days-before-stale: 60 - days-before-close: 7 - exempt-pr-labels: 'help wanted,enhancement,security,pinned' - stale-pr-label: 'wontfix' - stale-issue-label: 'wontfix' - exempt-issue-labels: 'help wanted,enhancement,security,pinned' - + stale: + runs-on: ubuntu-latest + steps: + - uses: actions/stale@v9 + with: + stale-issue-message: "This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions." + days-before-stale: 60 + days-before-close: 7 + exempt-pr-labels: "help wanted,enhancement,security,pinned" + stale-pr-label: "wontfix" + stale-issue-label: "wontfix" + exempt-issue-labels: "help wanted,enhancement,security,pinned" diff --git a/Tests/AsBuiltReport.Chart.Functions.Tests.ps1 b/Tests/AsBuiltReport.Chart.Functions.Tests.ps1 index 760dd22..6b29037 100644 --- a/Tests/AsBuiltReport.Chart.Functions.Tests.ps1 +++ b/Tests/AsBuiltReport.Chart.Functions.Tests.ps1 @@ -20,10 +20,10 @@ Describe 'AsBuiltReport.Chart Exported Functions' { Context 'New-PieChart' { It 'Should run without error with sample input' { - { New-PieChart -Title 'Test' -Values @(1,2) -Labels @('A','B') -Format 'png' -OutputFolderPath $TestDrive } | Should -Not -Throw + { New-PieChart -Title 'Test' -Values @(1, 2) -Labels @('A', 'B') -Format 'png' -OutputFolderPath $TestDrive } | Should -Not -Throw } It 'Should return a file path as output' { - $result = New-PieChart -Title 'Test' -Values @(1,2) -Labels @('A','B') -Format 'png' -OutputFolderPath $TestDrive + $result = New-PieChart -Title 'Test' -Values @(1, 2) -Labels @('A', 'B') -Format 'png' -OutputFolderPath $TestDrive $result | Should -BeOfType 'System.IO.FileSystemInfo' Test-Path $result | Should -BeTrue } @@ -31,16 +31,16 @@ Describe 'AsBuiltReport.Chart Exported Functions' { { New-PieChart } | Should -Throw } It 'Should throw error for mismatched Values and Labels' { - { New-PieChart -Title 'Test' -Values @(1,2) -Labels @('A') -Format 'png' -OutputFolderPath $TestDrive } | Should -Throw -ExpectedMessage "Error: Values and labels must be equal." + { New-PieChart -Title 'Test' -Values @(1, 2) -Labels @('A') -Format 'png' -OutputFolderPath $TestDrive } | Should -Throw -ExpectedMessage "Error: Values and labels must be equal." } } Context 'New-BarChart' { It 'Should run without error with sample input' { - { New-BarChart -Title 'Test' -Values @(1,2) -Labels @('A','B') -Format 'png' -OutputFolderPath $TestDrive } | Should -Not -Throw + { New-BarChart -Title 'Test' -Values @(1, 2) -Labels @('A', 'B') -Format 'png' -OutputFolderPath $TestDrive } | Should -Not -Throw } It 'Should return a file path as output' { - $result = New-BarChart -Title 'Test' -Values @(1,2) -Labels @('A','B') -Format 'png' -OutputFolderPath $TestDrive + $result = New-BarChart -Title 'Test' -Values @(1, 2) -Labels @('A', 'B') -Format 'png' -OutputFolderPath $TestDrive $result | Should -BeOfType 'System.IO.FileSystemInfo' Test-Path $result | Should -BeTrue } @@ -48,16 +48,16 @@ Describe 'AsBuiltReport.Chart Exported Functions' { { New-BarChart } | Should -Throw } It 'Should throw error for mismatched Values and Labels' { - { New-BarChart -Title 'Test' -Values @(1,2) -Labels @('A') -Format 'png' -OutputFolderPath $TestDrive } | Should -Throw -ExpectedMessage "Error: Values and labels must be equal." + { New-BarChart -Title 'Test' -Values @(1, 2) -Labels @('A') -Format 'png' -OutputFolderPath $TestDrive } | Should -Throw -ExpectedMessage "Error: Values and labels must be equal." } } Context 'New-StackedBarChart' { It 'Should run without error with sample input' { - { New-StackedBarChart -Title 'Test' -Values @(@(1,2),@(3,4)) -Labels @('A','B') -LegendCategories @('X','Y') -Format 'png' -OutputFolderPath $TestDrive } | Should -Not -Throw + { New-StackedBarChart -Title 'Test' -Values @(@(1, 2), @(3, 4)) -Labels @('A', 'B') -LegendCategories @('X', 'Y') -Format 'png' -OutputFolderPath $TestDrive } | Should -Not -Throw } It 'Should return a file path as output' { - $result = New-StackedBarChart -Title 'Test' -Values @(@(1,2),@(3,4)) -Labels @('A','B') -LegendCategories @('X','Y') -Format 'png' -OutputFolderPath $TestDrive + $result = New-StackedBarChart -Title 'Test' -Values @(@(1, 2), @(3, 4)) -Labels @('A', 'B') -LegendCategories @('X', 'Y') -Format 'png' -OutputFolderPath $TestDrive $result | Should -BeOfType 'System.IO.FileSystemInfo' Test-Path $result | Should -BeTrue } @@ -65,10 +65,10 @@ Describe 'AsBuiltReport.Chart Exported Functions' { { New-StackedBarChart } | Should -Throw } It 'Should throw error for mismatched Values and Labels' { - { New-StackedBarChart -Title 'Test' -Values @(@(1,2),@(3,4)) -Labels @('A') -LegendCategories @('X','Y') -OutputFolderPath $TestDrive -Format 'png' } | Should -Throw -ExpectedMessage "Error: Values and labels must be equal." + { New-StackedBarChart -Title 'Test' -Values @(@(1, 2), @(3, 4)) -Labels @('A') -LegendCategories @('X', 'Y') -OutputFolderPath $TestDrive -Format 'png' } | Should -Throw -ExpectedMessage "Error: Values and labels must be equal." } It 'Should throw error for mismatched Values and LegendCategories' { - { New-StackedBarChart -Title 'Test' -Values @(@(1,2),@(3,4)) -Labels @('A','B') -LegendCategories @('X') -Format 'png' -OutputFolderPath $TestDrive } | Should -Throw -ExpectedMessage "Error: Values and category names must be equal." + { New-StackedBarChart -Title 'Test' -Values @(@(1, 2), @(3, 4)) -Labels @('A', 'B') -LegendCategories @('X') -Format 'png' -OutputFolderPath $TestDrive } | Should -Throw -ExpectedMessage "Error: Values and category names must be equal." } } } diff --git a/Tests/Invoke-Tests.ps1 b/Tests/Invoke-Tests.ps1 index 579f983..7996873 100644 --- a/Tests/Invoke-Tests.ps1 +++ b/Tests/Invoke-Tests.ps1 @@ -132,7 +132,7 @@ if ($CodeCoverage) { Write-Host "`nRunning Pester tests..." -ForegroundColor Yellow Write-Host '======================================' -ForegroundColor Cyan -$TestResults = Invoke-Pester -Configuration $PesterConfiguration +$TestResults = Invoke-Pester -Configuration $PesterConfiguration -Verbose -Debug # Display results Write-Host "`n======================================" -ForegroundColor Cyan From 179fc80fe19dc38402daf134c2d46af73f34006f Mon Sep 17 00:00:00 2001 From: Jonathan Colon Date: Fri, 20 Feb 2026 22:26:17 -0400 Subject: [PATCH 11/20] Update Pester workflow to list DLL files from macOS ARM directory --- .github/workflows/Pester.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/Pester.yml b/.github/workflows/Pester.yml index 9a816cf..59fdad1 100644 --- a/.github/workflows/Pester.yml +++ b/.github/workflows/Pester.yml @@ -80,7 +80,7 @@ jobs: Install-Module -Name Pester -MinimumVersion 5.0.0 -Repository PSGallery -Force -AllowClobber -Scope CurrentUser - name: List Dll files in the test directory - run: Get-ChildItem -Path .\AsBuiltReport.Chart\Src\Assemblies\Core\ -Recurse + run: Get-ChildItem -Path .\AsBuiltReport.Chart\Src\Assemblies\Core\mac-osx\arm -Recurse if: matrix.os == 'macos-latest' - name: Run Pester Tests From 605a1ebbb6aff39df7634edfe3899b04d0c82629 Mon Sep 17 00:00:00 2001 From: Jonathan Colon Date: Fri, 20 Feb 2026 22:28:24 -0400 Subject: [PATCH 12/20] Fix path for listing DLL files in macOS ARM directory in Pester workflow --- .github/workflows/Pester.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/Pester.yml b/.github/workflows/Pester.yml index 59fdad1..ecbc3e9 100644 --- a/.github/workflows/Pester.yml +++ b/.github/workflows/Pester.yml @@ -80,7 +80,7 @@ jobs: Install-Module -Name Pester -MinimumVersion 5.0.0 -Repository PSGallery -Force -AllowClobber -Scope CurrentUser - name: List Dll files in the test directory - run: Get-ChildItem -Path .\AsBuiltReport.Chart\Src\Assemblies\Core\mac-osx\arm -Recurse + run: Get-ChildItem -Path .\AsBuiltReport.Chart\Src\Assemblies\Core\mac-osx\arm\ -Recurse if: matrix.os == 'macos-latest' - name: Run Pester Tests From e9a3a186d38c3d50acbead415229fbe869805fa1 Mon Sep 17 00:00:00 2001 From: Jonathan Colon Date: Fri, 20 Feb 2026 22:32:55 -0400 Subject: [PATCH 13/20] Fix path for listing DLL files in macOS ARM directory in Pester workflow --- .github/workflows/Pester.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/Pester.yml b/.github/workflows/Pester.yml index ecbc3e9..25501f4 100644 --- a/.github/workflows/Pester.yml +++ b/.github/workflows/Pester.yml @@ -80,7 +80,7 @@ jobs: Install-Module -Name Pester -MinimumVersion 5.0.0 -Repository PSGallery -Force -AllowClobber -Scope CurrentUser - name: List Dll files in the test directory - run: Get-ChildItem -Path .\AsBuiltReport.Chart\Src\Assemblies\Core\mac-osx\arm\ -Recurse + run: Get-ChildItem -Path ./AsBuiltReport.Chart/Src/Assemblies/Core/mac-osx/arm -Recurse if: matrix.os == 'macos-latest' - name: Run Pester Tests From 21b942810a0b844e0f62177b3b23d5b5a1a3bc4f Mon Sep 17 00:00:00 2001 From: Jonathan Colon Date: Fri, 20 Feb 2026 22:35:41 -0400 Subject: [PATCH 14/20] Update paths for copying libraries and listing DLL files in Pester workflow --- .github/workflows/Pester.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/Pester.yml b/.github/workflows/Pester.yml index 25501f4..eaad09b 100644 --- a/.github/workflows/Pester.yml +++ b/.github/workflows/Pester.yml @@ -48,25 +48,25 @@ jobs: run: dotnet publish ./Sources -c Release -r osx-arm64 if: matrix.os == 'macos-latest' - name: Copy the library for MacOS - run: copy ./Sources/bin/Release/netstandard2.0/osx-arm64/publish/*.* ./AsBuiltReport.Chart/Src/Assemblies/Core/mac-osx/arm + run: copy ./Sources/bin/Release/netstandard2.0/osx-arm64/publish/*.* ./AsBuiltReport.Chart/Src/Assemblies/Core/mac-osx/arm/ if: matrix.os == 'macos-latest' - name: Build the library for Linux run: dotnet publish ./Sources -c Release -r linux-x64 if: matrix.os == 'ubuntu-latest' - name: Copy the library for Linux - run: copy ./Sources/bin/Release/netstandard2.0/linux-x64/publish/*.* ./AsBuiltReport.Chart/Src/Assemblies/Core/linux-x64 + run: copy ./Sources/bin/Release/netstandard2.0/linux-x64/publish/*.* ./AsBuiltReport.Chart/Src/Assemblies/Core/linux-x64/ if: matrix.os == 'ubuntu-latest' - name: Build the library for Windows run: dotnet publish ./Sources -c Release -r win-x64 if: matrix.os == 'windows-latest' && matrix.shell == 'pwsh' - name: Copy the library for Windows - run: copy ./Sources/bin/Release/netstandard2.0/win-x64/publish/*.* ./AsBuiltReport.Chart/Src/Assemblies/Core/windows-x64 + run: copy ./Sources/bin/Release/netstandard2.0/win-x64/publish/*.* ./AsBuiltReport.Chart/Src/Assemblies/Core/windows-x64/ if: matrix.os == 'windows-latest' && matrix.shell == 'pwsh' - name: Build the library for Windows PowerShell run: dotnet publish ./Sources -c Release -r win-x64 if: matrix.os == 'windows-latest' && matrix.shell == 'powershell' - name: Copy the library for Windows PowerShell - run: copy ./Sources/bin/Release/netstandard2.0/win-x64/publish/*.* ./AsBuiltReport.Chart/Src/Assemblies/Desktop/windows-x64 + run: copy ./Sources/bin/Release/netstandard2.0/win-x64/publish/*.* ./AsBuiltReport.Chart/Src/Assemblies/Desktop/windows-x64/ if: matrix.os == 'windows-latest' && matrix.shell == 'powershell' - name: Run tests run: dotnet test --no-build --verbosity normal ./Sources @@ -80,7 +80,7 @@ jobs: Install-Module -Name Pester -MinimumVersion 5.0.0 -Repository PSGallery -Force -AllowClobber -Scope CurrentUser - name: List Dll files in the test directory - run: Get-ChildItem -Path ./AsBuiltReport.Chart/Src/Assemblies/Core/mac-osx/arm -Recurse + run: Get-ChildItem -Path ./AsBuiltReport.Chart/Src/Assemblies/Core/ -Recurse if: matrix.os == 'macos-latest' - name: Run Pester Tests From 7498556b2554aee3a91818880ed585ce498a49f5 Mon Sep 17 00:00:00 2001 From: Jonathan Colon Date: Fri, 20 Feb 2026 22:39:21 -0400 Subject: [PATCH 15/20] Update Pester workflow to use PowerShell commands for copying libraries across platforms --- .github/workflows/Pester.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/Pester.yml b/.github/workflows/Pester.yml index eaad09b..c388357 100644 --- a/.github/workflows/Pester.yml +++ b/.github/workflows/Pester.yml @@ -48,25 +48,25 @@ jobs: run: dotnet publish ./Sources -c Release -r osx-arm64 if: matrix.os == 'macos-latest' - name: Copy the library for MacOS - run: copy ./Sources/bin/Release/netstandard2.0/osx-arm64/publish/*.* ./AsBuiltReport.Chart/Src/Assemblies/Core/mac-osx/arm/ + run: Copy-Item -Path ./Sources/bin/Release/netstandard2.0/osx-arm64/publish/*.* -Destination ./AsBuiltReport.Chart/Src/Assemblies/Core/mac-osx/arm -Recurse if: matrix.os == 'macos-latest' - name: Build the library for Linux run: dotnet publish ./Sources -c Release -r linux-x64 if: matrix.os == 'ubuntu-latest' - name: Copy the library for Linux - run: copy ./Sources/bin/Release/netstandard2.0/linux-x64/publish/*.* ./AsBuiltReport.Chart/Src/Assemblies/Core/linux-x64/ + run: Copy-Item -Path ./Sources/bin/Release/netstandard2.0/linux-x64/publish/*.* -Destination ./AsBuiltReport.Chart/Src/Assemblies/Core/linux-x64 -Recurse if: matrix.os == 'ubuntu-latest' - name: Build the library for Windows run: dotnet publish ./Sources -c Release -r win-x64 if: matrix.os == 'windows-latest' && matrix.shell == 'pwsh' - name: Copy the library for Windows - run: copy ./Sources/bin/Release/netstandard2.0/win-x64/publish/*.* ./AsBuiltReport.Chart/Src/Assemblies/Core/windows-x64/ + run: Copy-Item -Path ./Sources/bin/Release/netstandard2.0/win-x64/publish/*.* -Destination ./AsBuiltReport.Chart/Src/Assemblies/Core/windows-x64 -Recurse if: matrix.os == 'windows-latest' && matrix.shell == 'pwsh' - name: Build the library for Windows PowerShell run: dotnet publish ./Sources -c Release -r win-x64 if: matrix.os == 'windows-latest' && matrix.shell == 'powershell' - name: Copy the library for Windows PowerShell - run: copy ./Sources/bin/Release/netstandard2.0/win-x64/publish/*.* ./AsBuiltReport.Chart/Src/Assemblies/Desktop/windows-x64/ + run: Copy-Item -Path ./Sources/bin/Release/netstandard2.0/win-x64/publish/*.* -Destination ./AsBuiltReport.Chart/Src/Assemblies/Desktop/windows-x64 -Recurse if: matrix.os == 'windows-latest' && matrix.shell == 'powershell' - name: Run tests run: dotnet test --no-build --verbosity normal ./Sources From d5e1e75cd2598d88778cc5685caaffca3ac8d313 Mon Sep 17 00:00:00 2001 From: Jonathan Colon Date: Fri, 20 Feb 2026 22:58:01 -0400 Subject: [PATCH 16/20] Update Pester workflow to improve library copy commands and list DLL files for macOS ARM --- .github/workflows/Pester.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/Pester.yml b/.github/workflows/Pester.yml index c388357..6adec9e 100644 --- a/.github/workflows/Pester.yml +++ b/.github/workflows/Pester.yml @@ -48,25 +48,25 @@ jobs: run: dotnet publish ./Sources -c Release -r osx-arm64 if: matrix.os == 'macos-latest' - name: Copy the library for MacOS - run: Copy-Item -Path ./Sources/bin/Release/netstandard2.0/osx-arm64/publish/*.* -Destination ./AsBuiltReport.Chart/Src/Assemblies/Core/mac-osx/arm -Recurse + run: Copy-Item -Path ./Sources/bin/Release/netstandard2.0/osx-arm64/publish/* -Destination ./AsBuiltReport.Chart/Src/Assemblies/Core/mac-osx/arm -Recurse -Verbose if: matrix.os == 'macos-latest' - name: Build the library for Linux run: dotnet publish ./Sources -c Release -r linux-x64 if: matrix.os == 'ubuntu-latest' - name: Copy the library for Linux - run: Copy-Item -Path ./Sources/bin/Release/netstandard2.0/linux-x64/publish/*.* -Destination ./AsBuiltReport.Chart/Src/Assemblies/Core/linux-x64 -Recurse + run: Copy-Item -Path ./Sources/bin/Release/netstandard2.0/linux-x64/publish/* -Destination ./AsBuiltReport.Chart/Src/Assemblies/Core/linux-x64 -Recurse if: matrix.os == 'ubuntu-latest' - name: Build the library for Windows run: dotnet publish ./Sources -c Release -r win-x64 if: matrix.os == 'windows-latest' && matrix.shell == 'pwsh' - name: Copy the library for Windows - run: Copy-Item -Path ./Sources/bin/Release/netstandard2.0/win-x64/publish/*.* -Destination ./AsBuiltReport.Chart/Src/Assemblies/Core/windows-x64 -Recurse + run: Copy-Item -Path ./Sources/bin/Release/netstandard2.0/win-x64/publish/* -Destination ./AsBuiltReport.Chart/Src/Assemblies/Core/windows-x64 -Recurse if: matrix.os == 'windows-latest' && matrix.shell == 'pwsh' - name: Build the library for Windows PowerShell run: dotnet publish ./Sources -c Release -r win-x64 if: matrix.os == 'windows-latest' && matrix.shell == 'powershell' - name: Copy the library for Windows PowerShell - run: Copy-Item -Path ./Sources/bin/Release/netstandard2.0/win-x64/publish/*.* -Destination ./AsBuiltReport.Chart/Src/Assemblies/Desktop/windows-x64 -Recurse + run: Copy-Item -Path ./Sources/bin/Release/netstandard2.0/win-x64/publish/* -Destination ./AsBuiltReport.Chart/Src/Assemblies/Desktop/windows-x64 -Recurse if: matrix.os == 'windows-latest' && matrix.shell == 'powershell' - name: Run tests run: dotnet test --no-build --verbosity normal ./Sources @@ -80,7 +80,7 @@ jobs: Install-Module -Name Pester -MinimumVersion 5.0.0 -Repository PSGallery -Force -AllowClobber -Scope CurrentUser - name: List Dll files in the test directory - run: Get-ChildItem -Path ./AsBuiltReport.Chart/Src/Assemblies/Core/ -Recurse + run: ls -alh ./AsBuiltReport.Chart/Src/Assemblies/Core/mac-osx/arm if: matrix.os == 'macos-latest' - name: Run Pester Tests From b06a9a64edbdcbd7bb785fffec197047e697870e Mon Sep 17 00:00:00 2001 From: Jonathan Colon Date: Fri, 20 Feb 2026 23:00:43 -0400 Subject: [PATCH 17/20] Update Pester workflow to use Unix-style copy command for macOS library --- .github/workflows/Pester.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/Pester.yml b/.github/workflows/Pester.yml index 6adec9e..5435711 100644 --- a/.github/workflows/Pester.yml +++ b/.github/workflows/Pester.yml @@ -48,7 +48,7 @@ jobs: run: dotnet publish ./Sources -c Release -r osx-arm64 if: matrix.os == 'macos-latest' - name: Copy the library for MacOS - run: Copy-Item -Path ./Sources/bin/Release/netstandard2.0/osx-arm64/publish/* -Destination ./AsBuiltReport.Chart/Src/Assemblies/Core/mac-osx/arm -Recurse -Verbose + run: cp -R ./Sources/bin/Release/netstandard2.0/osx-arm64/publish/* ./AsBuiltReport.Chart/Src/Assemblies/Core/mac-osx/arm/ if: matrix.os == 'macos-latest' - name: Build the library for Linux run: dotnet publish ./Sources -c Release -r linux-x64 From 9745b5b4c962282120860e16fa6666a278ef3aeb Mon Sep 17 00:00:00 2001 From: Jonathan Colon Date: Fri, 20 Feb 2026 23:06:35 -0400 Subject: [PATCH 18/20] Update Pester and Release workflows to use PowerShell copy commands and adjust library paths for macOS --- .github/workflows/Pester.yml | 6 +----- .github/workflows/Release.yml | 4 ++-- .../Src/Assemblies/Core/mac-osx/osx-arm64/dummy | 0 .../Src/Assemblies/Core/mac-osx/osx-x64/dummy | 0 4 files changed, 3 insertions(+), 7 deletions(-) create mode 100644 AsBuiltReport.Chart/Src/Assemblies/Core/mac-osx/osx-arm64/dummy create mode 100644 AsBuiltReport.Chart/Src/Assemblies/Core/mac-osx/osx-x64/dummy diff --git a/.github/workflows/Pester.yml b/.github/workflows/Pester.yml index 5435711..b4201ce 100644 --- a/.github/workflows/Pester.yml +++ b/.github/workflows/Pester.yml @@ -48,7 +48,7 @@ jobs: run: dotnet publish ./Sources -c Release -r osx-arm64 if: matrix.os == 'macos-latest' - name: Copy the library for MacOS - run: cp -R ./Sources/bin/Release/netstandard2.0/osx-arm64/publish/* ./AsBuiltReport.Chart/Src/Assemblies/Core/mac-osx/arm/ + run: Copy-Item -Path ./Sources/bin/Release/netstandard2.0/osx-arm64/publish/* -Destination ./AsBuiltReport.Chart/Src/Assemblies/Core/mac-osx/osx-arm64 -Recurse if: matrix.os == 'macos-latest' - name: Build the library for Linux run: dotnet publish ./Sources -c Release -r linux-x64 @@ -79,10 +79,6 @@ jobs: run: | Install-Module -Name Pester -MinimumVersion 5.0.0 -Repository PSGallery -Force -AllowClobber -Scope CurrentUser - - name: List Dll files in the test directory - run: ls -alh ./AsBuiltReport.Chart/Src/Assemblies/Core/mac-osx/arm - if: matrix.os == 'macos-latest' - - name: Run Pester Tests run: | $CodeCoverageParam = @{} diff --git a/.github/workflows/Release.yml b/.github/workflows/Release.yml index 5d134e2..46c2838 100644 --- a/.github/workflows/Release.yml +++ b/.github/workflows/Release.yml @@ -18,11 +18,11 @@ jobs: - name: Build the library for MacOS X64 run: dotnet publish ./Sources -c Release -r osx-x64 - name: Copy the library for MacOS X64 - run: copy ./Sources/bin/Release/netstandard2.0/osx-x64/publish/*.* ./AsBuiltReport.Chart/Src/Assemblies/Core/mac-osx/x64 + run: copy ./Sources/bin/Release/netstandard2.0/osx-x64/publish/*.* ./AsBuiltReport.Chart/Src/Assemblies/Core/mac-osx/osx-x64 - name: Build the library for MacOS Arm64 run: dotnet publish ./Sources -c Release -r osx-arm64 - name: Copy the library for MacOS Arm64 - run: copy ./Sources/bin/Release/netstandard2.0/osx-arm64/publish/*.* ./AsBuiltReport.Chart/Src/Assemblies/Core/mac-osx/arm + run: copy ./Sources/bin/Release/netstandard2.0/osx-arm64/publish/*.* ./AsBuiltReport.Chart/Src/Assemblies/Core/mac-osx/osx-arm64 - name: Build the library for Linux run: dotnet publish ./Sources -c Release -r linux-x64 - name: Copy the library for Linux diff --git a/AsBuiltReport.Chart/Src/Assemblies/Core/mac-osx/osx-arm64/dummy b/AsBuiltReport.Chart/Src/Assemblies/Core/mac-osx/osx-arm64/dummy new file mode 100644 index 0000000..e69de29 diff --git a/AsBuiltReport.Chart/Src/Assemblies/Core/mac-osx/osx-x64/dummy b/AsBuiltReport.Chart/Src/Assemblies/Core/mac-osx/osx-x64/dummy new file mode 100644 index 0000000..e69de29 From f3c45ee7d182d6fb566a11400f05df9161ff70ed Mon Sep 17 00:00:00 2001 From: Jonathan Colon Date: Fri, 20 Feb 2026 23:08:59 -0400 Subject: [PATCH 19/20] Fix module import paths for macOS ARM and x64 architectures in AsBuiltReport.Chart.psm1 --- AsBuiltReport.Chart/AsBuiltReport.Chart.psm1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/AsBuiltReport.Chart/AsBuiltReport.Chart.psm1 b/AsBuiltReport.Chart/AsBuiltReport.Chart.psm1 index c34a17b..57d1e66 100644 --- a/AsBuiltReport.Chart/AsBuiltReport.Chart.psm1 +++ b/AsBuiltReport.Chart/AsBuiltReport.Chart.psm1 @@ -5,15 +5,15 @@ switch ($PSVersionTable.PSEdition) { $architecture = [System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture if ($architecture -eq "Arm64" -or $architecture -eq "Arm") { Write-Verbose "Architecture: ARM (Apple Silicon)" - Import-Module ("$PSScriptRoot{0}Src{0}Assemblies{0}Core{0}mac-osx{0}arm{0}AsBuiltReportChart.dll" -f [System.IO.Path]::DirectorySeparatorChar) -Verbose -Debug + Import-Module ("$PSScriptRoot{0}Src{0}Assemblies{0}Core{0}mac-osx{0}osx-arm64{0}AsBuiltReportChart.dll" -f [System.IO.Path]::DirectorySeparatorChar) -Verbose -Debug } elseif ($architecture -eq "X64" -or $architecture -eq "X86") { Write-Verbose "Architecture: x86 (Intel)" - Import-Module ("$PSScriptRoot{0}Src{0}Assemblies{0}Core{0}mac-osx{0}x64{0}AsBuiltReportChart.dll" -f [System.IO.Path]::DirectorySeparatorChar) -Verbose -Debug + Import-Module ("$PSScriptRoot{0}Src{0}Assemblies{0}Core{0}mac-osx{0}osx-x64{0}AsBuiltReportChart.dll" -f [System.IO.Path]::DirectorySeparatorChar) -Verbose -Debug } else { Write-Verbose "Architecture: Unknown or other architecture" - Import-Module ("$PSScriptRoot{0}Src{0}Assemblies{0}Core{0}mac-osx{0}arm{0}AsBuiltReportChart.dll" -f [System.IO.Path]::DirectorySeparatorChar) -Verbose -Debug + Import-Module ("$PSScriptRoot{0}Src{0}Assemblies{0}Core{0}mac-osx{0}osx-arm64{0}AsBuiltReportChart.dll" -f [System.IO.Path]::DirectorySeparatorChar) -Verbose -Debug } } elseif ($IsLinux) { Import-Module ("$PSScriptRoot{0}Src{0}Assemblies{0}Core{0}linux-x64{0}AsBuiltReportChart.dll" -f [System.IO.Path]::DirectorySeparatorChar) From fe37d46aa07c04a280f2270fee8289cb29ac1a71 Mon Sep 17 00:00:00 2001 From: Jonathan Colon Date: Fri, 20 Feb 2026 23:14:29 -0400 Subject: [PATCH 20/20] Update module version to 0.2.0 and add changelog entry for new features --- AsBuiltReport.Chart/AsBuiltReport.Chart.psd1 | 2 +- CHANGELOG.md | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/AsBuiltReport.Chart/AsBuiltReport.Chart.psd1 b/AsBuiltReport.Chart/AsBuiltReport.Chart.psd1 index e62bd2c..e24a408 100644 --- a/AsBuiltReport.Chart/AsBuiltReport.Chart.psd1 +++ b/AsBuiltReport.Chart/AsBuiltReport.Chart.psd1 @@ -12,7 +12,7 @@ RootModule = 'AsBuiltReport.Chart.psm1' # Version number of this module. - ModuleVersion = '0.1.0' + ModuleVersion = '0.2.0' # Supported PSEditions # CompatiblePSEditions = @() diff --git a/CHANGELOG.md b/CHANGELOG.md index d933a72..6aed89a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,16 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.2.0] - 2026-02-20 + +### Added + +- Add pester test to validate the functionality of the module + +### Changed + +- Update module version to 0.2.0 + ## [0.1.0] - 2026-02-19 ### Added