File tree Expand file tree Collapse file tree 3 files changed +23
-9
lines changed
Expand file tree Collapse file tree 3 files changed +23
-9
lines changed Original file line number Diff line number Diff line change 1818 - name : Setup .NET
1919 uses : actions/setup-dotnet@v4
2020 with :
21- dotnet-version : ' 6.0.x'
21+ global-json-file : global.json
22+
2223
2324 - name : Restore dependencies
2425 run : dotnet restore
3031 shell : pwsh
3132 run : |
3233 Install-Module -Name Pester -Force -SkipPublisherCheck -Scope CurrentUser
33- Invoke-Pester -Path .\Tests\FindOpenFile.Tests.ps1 -Output Detailed -Configuration @{ Run = @{ Container = New-PesterContainer -Path .\Tests\FindOpenFile.Tests.ps1 -Data @{ Configuration = 'Release' } } }
34+ Invoke-Pester -Path .\Tests\FindOpenFile.Tests.ps1 -Output Detailed
35+ env :
36+ BUILD_CONFIGURATION : Release
3437
3538 - name : Upload build artifacts
3639 uses : actions/upload-artifact@v4
4952 - name : Setup .NET
5053 uses : actions/setup-dotnet@v4
5154 with :
52- dotnet-version : ' 6 .0.x'
55+ dotnet-version : ' 10 .0.x'
5356
5457 - name : Build Release
5558 run : dotnet build --configuration Release
Original file line number Diff line number Diff line change 1- param (
2- [Parameter ()]
3- [ValidateSet (' Debug' , ' Release' )]
4- [string ]$Configuration = ' Debug'
5- )
6-
71BeforeAll {
2+ # Get configuration from environment variable, default to 'Debug' if not set
3+ $Configuration = $env: BUILD_CONFIGURATION
4+ if ([string ]::IsNullOrWhiteSpace($Configuration )) {
5+ $Configuration = ' Debug'
6+ }
7+
8+ # Validate configuration value
9+ if ($Configuration -notin @ (' Debug' , ' Release' )) {
10+ throw " Invalid BUILD_CONFIGURATION value: '$Configuration '. Must be 'Debug' or 'Release'."
11+ }
12+
813 # Import the module from the specified build configuration directory
914 $modulePath = Join-Path $PSScriptRoot " ..\bin\$Configuration \netstandard2.0\FindOpenFile.psd1"
1015
Original file line number Diff line number Diff line change 1+ {
2+ "sdk" : {
3+ "version" : " 10.0.100" ,
4+ "rollForward" : " latestMinor"
5+ }
6+ }
You can’t perform that action at this time.
0 commit comments