Skip to content

Commit c9a6b87

Browse files
committed
updated CI 8
1 parent b65c5dc commit c9a6b87

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

.azdevops/RunTests.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ if ($null -ne $module)
1616
# Import the built module
1717
Import-Module "$env:PIPELINE_WORKSPACE/ModuleBuild/Microsoft.PowerShell.Archive.psd1"
1818

19-
$pesterMinVersion = "5.3"
19+
$pesterMinVersion = "5.3.0"
2020
$pesterMaxVersion = "5.3.9"
2121

2222
# If Pester 5.3.3 is not installed, install it

.azdevops/TestsTemplate.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,12 @@ jobs:
7676
$content = 7z.exe a archive.zip .azdevops
7777
$content | Write-Verbose -Verbose
7878
}
79+
Get-ChildItem $(PowerShellPreviewExecutablePath) | Write-Verbose
7980
"$(PowerShellPreviewExecutablePath) .azdevops/RunTests.ps1" | Invoke-Expression
81+
if ("${{ parameters.vmImageName }}" -like 'macos-*')
82+
{
83+
"pwsh .azdevops/RunTests.ps1" | Invoke-Expression
84+
}
8085
displayName: Run Tests
8186
8287
- task: PublishTestResults@2

Tests/Compress-Archive.Tests.ps1

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ BeforeDiscovery {
6363
) -Tag this1 {
6464
$DestinationPath = "TestDrive:/archive2.zip"
6565

66+
Write-Verbose -Message "${PWD}" -Verbose
67+
6668
Compress-Archive -Path $Path -DestinationPath $DestinationPath -ErrorAction SilentlyContinue -ErrorVariable error
6769
$error.Count | Should -Be 1
6870
$error[0].FullyQualifiedErrorId | Should -Be "InvalidPath,Microsoft.PowerShell.Archive.CompressArchiveCommand"
@@ -251,6 +253,11 @@ BeforeDiscovery {
251253
$destinationPath = "TestDrive:/archive1.zip"
252254
Compress-Archive -Path $sourcePath -DestinationPath $destinationPath
253255
$destinationPath | Should -BeZipArchiveOnlyContaining @('SourceDir/', 'SourceDir/Sample-1.txt')
256+
257+
if ($IsWindows) {
258+
$t = Convert-Path $destinationPath
259+
7z l "${t}" | Write-Verbose -Verbose
260+
}
254261
}
255262
}
256263

0 commit comments

Comments
 (0)