diff --git a/.github/workflows/build-test-deploy-powershell.yaml b/.github/workflows/build-test-deploy-powershell.yaml index c19af4be..63a6356b 100644 --- a/.github/workflows/build-test-deploy-powershell.yaml +++ b/.github/workflows/build-test-deploy-powershell.yaml @@ -29,3 +29,66 @@ jobs: with: name: BuildOutput path: BuildOutput + + test_ubu: + name: Test Ubuntu + runs-on: ubuntu-latest + needs: + - build + timeout-minutes: 120 + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Download BuildOutput directory + uses: actions/download-artifact@v4 + with: + name: BuildOutput + path: BuildOutput + + - name: Test Module + shell: pwsh + run: | + . ./build.ps1 -Task Test + + test_win: + name: Test Windows + runs-on: windows-latest + needs: + - build + timeout-minutes: 120 + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Download BuildOutput directory + uses: actions/download-artifact@v4 + with: + name: BuildOutput + path: BuildOutput + + - name: Test Module + shell: pwsh + run: | + . ./build.ps1 -Task Test + + test_mac: + name: Test MacOS + runs-on: macos-latest + needs: + - build + timeout-minutes: 120 + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Download BuildOutput directory + uses: actions/download-artifact@v4 + with: + name: BuildOutput + path: BuildOutput + + - name: Test Module + shell: pwsh + run: | + . ./build.ps1 -Task Test diff --git a/Tests/3. Integration Tests/PSGSuite.Integration.Tests.ps1 b/Tests/3. Integration Tests/PSGSuite.Integration.Tests.ps1 index a699cc98..052e58de 100644 --- a/Tests/3. Integration Tests/PSGSuite.Integration.Tests.ps1 +++ b/Tests/3. Integration Tests/PSGSuite.Integration.Tests.ps1 @@ -1,22 +1,24 @@ -if ($ENV:BUILD_BUILDURI -like 'vstfs:*' -and -not [String]::IsNullOrEmpty($env:PSGSuiteConfigJson)) { - $projectRoot = Resolve-Path "$PSScriptRoot\..\.." - $ModulePath = Resolve-Path "$projectRoot\BuildOutput\$($env:BHProjectName)" - $decompiledModulePath = Resolve-Path "$projectRoot\$($env:BHProjectName)" +# if ($ENV:BUILD_BUILDURI -like 'vstfs:*' -and -not [String]::IsNullOrEmpty($env:PSGSuiteConfigJson)) { +# $projectRoot = Resolve-Path "$PSScriptRoot\..\.." +# $ModulePath = Resolve-Path "$projectRoot\BuildOutput\$($env:BHProjectName)" +# $decompiledModulePath = Resolve-Path "$projectRoot\$($env:BHProjectName)" - $Verbose = @{} - if ($ENV:BHBranchName -eq "development" -or $env:BHCommitMessage -match "!verbose") { - $Verbose.add("Verbose",$True) - } - $moduleRoot = Split-Path (Resolve-Path "$ModulePath\*\*.psd1") +# $Verbose = @{} +# if ($ENV:BHBranchName -eq "development" -or $env:BHCommitMessage -match "!verbose") { +# $Verbose.add("Verbose",$True) +# } +# $moduleRoot = Split-Path (Resolve-Path "$ModulePath\*\*.psd1") - Import-Module $ModulePath -Force -Verbose:$false - Import-PSGSuiteConfig -Json $env:PSGSuiteConfigJson -Temporary -Verbose +# Import-Module $ModulePath -Force -Verbose:$false +# Import-PSGSuiteConfig -Json $env:PSGSuiteConfigJson -Temporary -Verbose + +# $u = Get-GSUser +# $u | Select-Object @{N="GivenName";E={$_.Name.GivenName}},OrgUnitPath,Kind + +# Send-GmailMessage -From $u.PrimaryEmail -To $u.PrimaryEmail -Subject "Hello from Azure Pipelines + PS Version $($PSVersionTable.PSVersion.ToString())!" -Body "
`n$((Get-ChildItem Env: | Where-Object {$_.Name -match '^(BUILD_|BH).*$'} | Format-Table -AutoSize | Out-String).Trim())`n
" -BodyAsHtml -Verbose +# } - $u = Get-GSUser - $u | Select-Object @{N="GivenName";E={$_.Name.GivenName}},OrgUnitPath,Kind - Send-GmailMessage -From $u.PrimaryEmail -To $u.PrimaryEmail -Subject "Hello from Azure Pipelines + PS Version $($PSVersionTable.PSVersion.ToString())!" -Body "
`n$((Get-ChildItem Env: | Where-Object {$_.Name -match '^(BUILD_|BH).*$'} | Format-Table -AutoSize | Out-String).Trim())`n
" -BodyAsHtml -Verbose -} <# Describe "Function contents" -Tag 'Module' { Context "Get-GSUser should return a user" {