Skip to content

Commit

Permalink
Appveyor build on Ps5 + Ps7
Browse files Browse the repository at this point in the history
  • Loading branch information
gerardog committed Feb 2, 2022
1 parent 0106023 commit 97bf7e2
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -328,3 +328,4 @@ ASALocalRun/

# MFractors (Xamarin productivity tool) working folder
.mfractor/
*.bak
9 changes: 4 additions & 5 deletions appveyor.yml
Expand Up @@ -15,6 +15,9 @@ after_build:
- 7z a gsudo.%CONFIGURATION%.%APPVEYOR_BUILD_VERSION%.Unsigned.zip %APPVEYOR_BUILD_FOLDER%\src\gsudo\bin\*.* %APPVEYOR_BUILD_FOLDER%\src\gsudo.extras\gsudoModule.* %APPVEYOR_BUILD_FOLDER%\src\gsudo.extras\Invoke-gsudo.ps1
- appveyor PushArtifact gsudo.%CONFIGURATION%.%APPVEYOR_BUILD_VERSION%.Unsigned.zip
# - vstest.console /logger:Appveyor C:\git\gsudo\src\gsudo.Tests\bin\%CONFIGURATION%\gsudo.Tests.dll
- ps: $Env:Path+=";$($Env:APPVEYOR_BUILD_FOLDER)/src/gsudo/bin;";
- powershell -c Invoke-Pester -EnableExit -OutputFile Powershell5Tests.xml -OutputFormat NUnitXml
- pwsh -c Invoke-Pester -EnableExit -OutputFile PowershellCoreTests.xml -OutputFormat NUnitXml

on_finish:
- ps: if($env:APPVEYOR_RDP_ENABLED -eq 'TRUE') { $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) }
Expand All @@ -27,11 +30,7 @@ build:
parallel: true
project: src\gsudo.sln
verbosity: minimal

test_script:
- ps: $Env:Path+=";$($Env:APPVEYOR_BUILD_FOLDER)/src/gsudo/bin;";
- powershell -c Invoke-Pester -EnableExit


cache:
- src\packages -> **\packages.config # preserve "packages" directory in the root of build folder but will reset it if packages.config is modified
- '%LocalAppData%\NuGet\Cache' # NuGet < v3
Expand Down
2 changes: 1 addition & 1 deletion src/gsudo.extras/Invoke-gsudo.Tests.ps1
@@ -1,4 +1,4 @@
Describe 'Invoke-Gsudo' {
Describe "Invoke-Gsudo with PowerShell v$($PSVersionTable.PSVersion.ToString())" {
It "It serializes return values maintaining its type" {
$result = invoke-gsudo { 1+1 }
$result | Should -Be 2
Expand Down
2 changes: 1 addition & 1 deletion src/gsudo.extras/gsudo.Tests.ps1
@@ -1,4 +1,4 @@
Describe 'Gsudo' {
Describe "Gsudo with PowerShell v$($PSVersionTable.PSVersion.ToString())" {
BeforeAll {
$Path = (Get-Item (Join-Path $PSScriptRoot "gsudoModule.psm1")).FullName
$Path | Should -not -BeNullOrEmpty
Expand Down

0 comments on commit 97bf7e2

Please sign in to comment.